예제 #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);
   }
 }
예제 #2
0
 public void setContent(InputStream in) throws IOException {
   Parser parser = new Parser();
   String fileHash = parser.parse(in, hashStore, blobStore);
   setHash(fileHash);
 }