File tree Expand file tree Collapse file tree
src/java/org/apache/commons/io Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments