You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ju...@apache.org on 2009/01/22 01:52:16 UTC
svn commit: r736507 -
/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java
Author: jukka
Date: Wed Jan 21 16:52:15 2009
New Revision: 736507
URL: http://svn.apache.org/viewvc?rev=736507&view=rev
Log:
IO-189: update javadoc on HexDump.dump method
Modified:
commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java
Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java?rev=736507&r1=736506&r2=736507&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/HexDump.java Wed Jan 21 16:52:15 2009
@@ -41,10 +41,24 @@
}
/**
- * Dump an array of bytes to an OutputStream.
+ * Dump an array of bytes to an OutputStream. The output is formatted
+ * for human inspection, with a hexadecimal offset followed by the
+ * hexadecimal values of the next 16 bytes of data and the printable ASCII
+ * characters (if any) that those bytes represent printed per each line
+ * of output.
+ * <p>
+ * The offset argument specifies the start offset of the data array
+ * within a larger entity like a file or an incoming stream. For example,
+ * if the data array contains the third kibibyte of a file, then the
+ * offset argument should be set to 2048. The offset value printed
+ * at the beginning of each line indicates where in that larger entity
+ * the first byte on that line is located.
+ * <p>
+ * All bytes between the given index (inclusive) and the end of the
+ * data array are dumped.
*
* @param data the byte array to be dumped
- * @param offset its offset, whatever that might mean
+ * @param offset offset of the byte array within a larger entity
* @param stream the OutputStream to which the data is to be
* written
* @param index initial index into the byte array