You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ac...@apache.org on 2005/04/27 07:44:52 UTC
cvs commit: jakarta-poi/src/java/org/apache/poi/util HexDump.java
acoliver 2005/04/26 22:44:52
Modified: src/java/org/apache/poi/util HexDump.java
Log:
added a main method so we can use it as a quickie utility (been meaning to do that for years)
Revision Changes Path
1.16 +9 -0 jakarta-poi/src/java/org/apache/poi/util/HexDump.java
Index: HexDump.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/util/HexDump.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- HexDump.java 10 Aug 2004 02:59:40 -0000 1.15
+++ HexDump.java 27 Apr 2005 05:44:52 -0000 1.16
@@ -393,4 +393,13 @@
byte[] data = buf.toByteArray();
dump(data, 0, out, start, data.length);
}
+
+ public static void main(String[] args) throws Exception {
+ File file = new File(args[0]);
+ InputStream in = new BufferedInputStream(new FileInputStream(file));
+ byte[] b = new byte[(int)file.length()];
+ in.read(b);
+ System.out.println(HexDump.dump(b, 0, 0));
+ in.close();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/