mirror of https://github.com/apache/poi.git
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:
parent
7860872993
commit
19e7f9545f
|
@ -393,4 +393,13 @@ public class HexDump
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue