ApplicationFile implements Comparable<ApplicationFile> { public abstract Reader createReader() throws FileNotFoundException; protected  ApplicationFile(Path path); abstract boolean isDirectory(); abstract boolean exists(); abstract Reader createReader(); abstract InputStream createInputStream(); abstract ApplicationFile createDirectory(); abstract ApplicationFile writeFile(Reader input); abstract ApplicationFile appendFile(String value); List<ApplicationFile> listFiles(); abstract List<ApplicationFile> listFiles(PathFilter filter); List<ApplicationFile> listFiles(boolean recurse); abstract ApplicationFile delete(); Path getPath(); @Override String toString(); @Override boolean equals(Object other); abstract MetaData getMetaData(); static final String ContentStatusNew; static final String ContentStatusChanged; static final String ContentStatusDeleted; }
@Test public void testReadingFromInputStream() throws Exception { String data = IOUtils.readAll(getApplicationFile(Path.fromString("files/foo.json")).createReader()); assertTrue(data.contains("foo : foo")); }