@Test void testGetResourceAsStream2() { DirectoryResource resource = new DirectoryResource(new File(".")); assertNotNull(resource.getResourceAsStream("pom.xml")); }
@Override public InputStream getResourceAsStream(String location) { InputStream result = null; File file = new File(rootDirectory, location); try { result = new FileInputStream(file); } catch (FileNotFoundException exception) { } return result; }
DirectoryResource implements Resource { @Override public InputStream getResourceAsStream(String location) { InputStream result = null; File file = new File(rootDirectory, location); try { result = new FileInputStream(file); } catch (FileNotFoundException exception) { } return result; } }
DirectoryResource implements Resource { @Override public InputStream getResourceAsStream(String location) { InputStream result = null; File file = new File(rootDirectory, location); try { result = new FileInputStream(file); } catch (FileNotFoundException exception) { } return result; } DirectoryResource();  DirectoryResource(String rootDirectory);  DirectoryResource(File rootDirectory); }
DirectoryResource implements Resource { @Override public InputStream getResourceAsStream(String location) { InputStream result = null; File file = new File(rootDirectory, location); try { result = new FileInputStream(file); } catch (FileNotFoundException exception) { } return result; } DirectoryResource();  DirectoryResource(String rootDirectory);  DirectoryResource(File rootDirectory); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location); @Override Stream<String> getAllLocations(); File getRootDirectory(); void setRootDirectory(File rootDirectory); }
DirectoryResource implements Resource { @Override public InputStream getResourceAsStream(String location) { InputStream result = null; File file = new File(rootDirectory, location); try { result = new FileInputStream(file); } catch (FileNotFoundException exception) { } return result; } DirectoryResource();  DirectoryResource(String rootDirectory);  DirectoryResource(File rootDirectory); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location); @Override Stream<String> getAllLocations(); File getRootDirectory(); void setRootDirectory(File rootDirectory);  }