@Test public void testGetResourceStream() throws Exception { try (final InputStream stream = loader.getResourceStream("ClassResourceLoader-testGetResourceStream.txt")) { assertThat(IOUtils.toString(stream, "utf-8")).isEqualTo("test"); } }
@Override public InputStream getResourceStream(final String source) throws ResourceNotFoundException { final InputStream stream = ClassResourceLoader.class.getResourceAsStream(source); if (stream == null) { throw new ResourceNotFoundException("Resource not found: " + source); } return stream; }
ClassResourceLoader extends ResourceLoader { @Override public InputStream getResourceStream(final String source) throws ResourceNotFoundException { final InputStream stream = ClassResourceLoader.class.getResourceAsStream(source); if (stream == null) { throw new ResourceNotFoundException("Resource not found: " + source); } return stream; } }
ClassResourceLoader extends ResourceLoader { @Override public InputStream getResourceStream(final String source) throws ResourceNotFoundException { final InputStream stream = ClassResourceLoader.class.getResourceAsStream(source); if (stream == null) { throw new ResourceNotFoundException("Resource not found: " + source); } return stream; }  }
ClassResourceLoader extends ResourceLoader { @Override public InputStream getResourceStream(final String source) throws ResourceNotFoundException { final InputStream stream = ClassResourceLoader.class.getResourceAsStream(source); if (stream == null) { throw new ResourceNotFoundException("Resource not found: " + source); } return stream; }  @Override void init(final ExtendedProperties configuration); @Override InputStream getResourceStream(final String source); @Override boolean isSourceModified(final Resource resource); @Override long getLastModified(final Resource resource); }
ClassResourceLoader extends ResourceLoader { @Override public InputStream getResourceStream(final String source) throws ResourceNotFoundException { final InputStream stream = ClassResourceLoader.class.getResourceAsStream(source); if (stream == null) { throw new ResourceNotFoundException("Resource not found: " + source); } return stream; }  @Override void init(final ExtendedProperties configuration); @Override InputStream getResourceStream(final String source); @Override boolean isSourceModified(final Resource resource); @Override long getLastModified(final Resource resource);  }