Skip to content

Commit e702b9f

Browse files
committed
IO-189: update javadoc on HexDump.dump method
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@736507 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7cf1715 commit e702b9f

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

src/java/org/apache/commons/io/HexDump.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,24 @@ public HexDump() {
4141
}
4242

4343
/**
44-
* Dump an array of bytes to an OutputStream.
44+
* Dump an array of bytes to an OutputStream. The output is formatted
45+
* for human inspection, with a hexadecimal offset followed by the
46+
* hexadecimal values of the next 16 bytes of data and the printable ASCII
47+
* characters (if any) that those bytes represent printed per each line
48+
* of output.
49+
* <p>
50+
* The offset argument specifies the start offset of the data array
51+
* within a larger entity like a file or an incoming stream. For example,
52+
* if the data array contains the third kibibyte of a file, then the
53+
* offset argument should be set to 2048. The offset value printed
54+
* at the beginning of each line indicates where in that larger entity
55+
* the first byte on that line is located.
56+
* <p>
57+
* All bytes between the given index (inclusive) and the end of the
58+
* data array are dumped.
4559
*
4660
* @param data the byte array to be dumped
47-
* @param offset its offset, whatever that might mean
61+
* @param offset offset of the byte array within a larger entity
4862
* @param stream the OutputStream to which the data is to be
4963
* written
5064
* @param index initial index into the byte array

0 commit comments

Comments
 (0)