@Test public void testReadingResourceUsingFileURL() throws IOException { String expectedLine = "Hello world!"; Resource resource = customServiceLoader.getResource("file:/home/vagrant/GitHub/farrukhjon/spring-examples/spring-resources-examples/src/test/resources/test.txt"); InputStream inputStream = resource.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); String line; while ((line = reader.readLine()) != null) { assertEquals(expectedLine, line); } notNull(inputStream); }
public Resource getResource(final String location) { return resourceLoader.getResource(location); }
CustomServiceLoader implements ResourceLoaderAware { public Resource getResource(final String location) { return resourceLoader.getResource(location); } }
CustomServiceLoader implements ResourceLoaderAware { public Resource getResource(final String location) { return resourceLoader.getResource(location); }  }
CustomServiceLoader implements ResourceLoaderAware { public Resource getResource(final String location) { return resourceLoader.getResource(location); }  @Override void setResourceLoader(final ResourceLoader resourceLoader); Resource getResource(final String location); }
CustomServiceLoader implements ResourceLoaderAware { public Resource getResource(final String location) { return resourceLoader.getResource(location); }  @Override void setResourceLoader(final ResourceLoader resourceLoader); Resource getResource(final String location);  }