Author: edeoliveira
Date: Sun Aug 17 03:58:23 2008
New Revision: 686598

URL: http://svn.apache.org/viewvc?rev=686598&view=rev
Log:
Added some javadoc & replaced StringBuffer by StringBuilder to improve 
performance

Modified:
    
mina/trunk/core/src/main/java/org/apache/mina/core/buffer/IoBufferHexDumper.java

Modified: 
mina/trunk/core/src/main/java/org/apache/mina/core/buffer/IoBufferHexDumper.java
URL: 
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/buffer/IoBufferHexDumper.java?rev=686598&r1=686597&r2=686598&view=diff
==============================================================================
--- 
mina/trunk/core/src/main/java/org/apache/mina/core/buffer/IoBufferHexDumper.java
 (original)
+++ 
mina/trunk/core/src/main/java/org/apache/mina/core/buffer/IoBufferHexDumper.java
 Sun Aug 17 03:58:23 2008
@@ -19,20 +19,27 @@
  */
 package org.apache.mina.core.buffer;
 
-
-
 /**
- * Provides utility methods for an [EMAIL PROTECTED] IoBuffer}.
+ * Provides utility methods to dump an [EMAIL PROTECTED] IoBuffer} into a hex 
formatted string.
  *
  * @author The Apache MINA Project ([EMAIL PROTECTED])
  * @version $Rev$, $Date$
  */
 class IoBufferHexDumper {
+
+    /**
+     * The high digits lookup table.
+     */
     private static final byte[] highDigits;
 
+    /**
+     * The low digits lookup table.
+     */
     private static final byte[] lowDigits;
 
-    // initialize lookup tables
+    /**
+     * Initialize lookup tables.
+     */
     static {
         final byte[] digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
                 '9', 'A', 'B', 'C', 'D', 'E', 'F' };
@@ -50,6 +57,13 @@
         lowDigits = low;
     }
 
+    /**
+     * Dumps an [EMAIL PROTECTED] IoBuffer} to a hex formatted string.
+     * 
+     * @param in the buffer to dump
+     * @param lengthLimit the limit at which hex dumping will stop
+     * @return a hex formatted string representation of the <i>in</i> [EMAIL 
PROTECTED] Iobuffer}.
+     */
     public static String getHexdump(IoBuffer in, int lengthLimit) {
         if (lengthLimit == 0) {
             throw new IllegalArgumentException("lengthLimit: " + lengthLimit
@@ -68,7 +82,7 @@
             return "empty";
         }
 
-        StringBuffer out = new StringBuffer(in.remaining() * 3 - 1);
+        StringBuilder out = new StringBuilder(in.remaining() * 3 - 1);
 
         int mark = in.position();
 


Reply via email to