CentralFileResolver implements FileResolver { @Override public InputStream openInputStream(String fileId) throws IOException { Path fileName = resolvePath(fileId); logger.trace("Reading data from file {}", fileName); InputStream ret; if (!Files.exists(fileName)) { throw new FileNotFoundException(fileName.toString()); } else { ret = Files.newInputStream(fileName); } return ret; }  @Override void validateFileId(String fileId); @Override InputStream openInputStream(String fileId); @Override OutputStream openOutputStream(String fileId); @Override InputStream openInputStream(InfolisFile inputFile); @Override OutputStream openOutputStream(InfolisFile outputFile);  }
@Test public void testOpenInputStreamString() throws Exception { InputStream in = fr.openInputStream(checksum); char[] read = IOUtils.toCharArray(in); assertEquals(inData.length, read.length); for (int i = 0; i < read.length; i++) { assertEquals(inData[i], read[i]); } }