added a main method so we can use it as a quickie utility (been meaning to do that for years)

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353651 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2005-04-27 05:44:52 +00:00
parent ba11bd33fc
commit 3d6a9d6a48

View File

@ -393,4 +393,13 @@ public class HexDump
byte[] data = buf.toByteArray(); byte[] data = buf.toByteArray();
dump(data, 0, out, start, data.length); 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();
}
} }