code: public static final void fileHexDump(String fileName, InputStream is)
     {
        try
        {
           byte[] data = new byte[is.available()];
           is.read(data);
           fileHexDump(fileName, data);
        }
  
        catch (IOException ex)
        {
           ex.printStackTrace();
        }
     }
docs: Writes a hex dump to a file from a POI input stream.
  Note that this assumes that the complete size of the data in
  the stream is returned by the available() method.
  
  @param fileName output file name
  @param is input stream