aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/util/HexDump.java
diff options
context:
space:
mode:
authorSaid Ryan Ackley <sackley@apache.org>2002-04-19 22:30:50 +0000
committerSaid Ryan Ackley <sackley@apache.org>2002-04-19 22:30:50 +0000
commitcc57327b0d0b63f6bca079fcf545e0ff6b1e30d7 (patch)
tree6c316a2f282f05c9e202fff1ac65e661b06127d1 /src/java/org/apache/poi/util/HexDump.java
parent67f615120efbf8f2e3ce77161b6884bd82cf3276 (diff)
downloadpoi-cc57327b0d0b63f6bca079fcf545e0ff6b1e30d7.tar.gz
poi-cc57327b0d0b63f6bca079fcf545e0ff6b1e30d7.zip
Made some changes for HDF types
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/util/HexDump.java')
-rw-r--r--src/java/org/apache/poi/util/HexDump.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/util/HexDump.java b/src/java/org/apache/poi/util/HexDump.java
index 4eac10f379..4e0cfd35a3 100644
--- a/src/java/org/apache/poi/util/HexDump.java
+++ b/src/java/org/apache/poi/util/HexDump.java
@@ -187,6 +187,24 @@ public class HexDump
* Converts the parameter to a hex value.
*
* @param value The value to convert
+ * @return A String representing the array of bytes
+ */
+ public static String toHex(final byte[] value)
+ {
+ StringBuffer retVal = new StringBuffer();
+ retVal.append('[');
+ for(int x = 0; x < value.length; x++)
+ {
+ retVal.append(toHex(value[x]));
+ retVal.append(", ");
+ }
+ retVal.append(']');
+ return retVal.toString();
+ }
+ /**
+ * Converts the parameter to a hex value.
+ *
+ * @param value The value to convert
* @return The result right padded with 0
*/
public static String toHex(final short value)