示例#1
0
 public static String parse(File f, BlobStore blobStore, HashStore hashStore)
     throws FileNotFoundException, IOException {
   Parser parser = new Parser();
   FileInputStream fin = null;
   BufferedInputStream bufIn = null;
   try {
     fin = new FileInputStream(f);
     bufIn = new BufferedInputStream(fin);
     return parser.parse(bufIn, hashStore, blobStore);
   } finally {
     IOUtils.closeQuietly(bufIn);
     IOUtils.closeQuietly(fin);
   }
 }
 public void setContent(InputStream in) throws IOException {
   Parser parser = new Parser();
   String fileHash = parser.parse(in, hashStore, blobStore);
   setHash(fileHash);
 }