@Test public void shouldGetResourceAsReader() throws Exception { try(Reader in = Resources.getResourceAsReader(CLASS_LOADER, JPETSTORE_PROPERTIES)) { assertNotNull(in); } }
public static Reader getResourceAsReader(String resource) throws IOException { Reader reader; if (charset == null) { reader = new InputStreamReader(getResourceAsStream(resource)); } else { reader = new InputStreamReader(getResourceAsStream(resource), charset); } return reader; }
Resources { public static Reader getResourceAsReader(String resource) throws IOException { Reader reader; if (charset == null) { reader = new InputStreamReader(getResourceAsStream(resource)); } else { reader = new InputStreamReader(getResourceAsStream(resource), charset); } return reader; } }
Resources { public static Reader getResourceAsReader(String resource) throws IOException { Reader reader; if (charset == null) { reader = new InputStreamReader(getResourceAsStream(resource)); } else { reader = new InputStreamReader(getResourceAsStream(resource), charset); } return reader; } Resources(); }
Resources { public static Reader getResourceAsReader(String resource) throws IOException { Reader reader; if (charset == null) { reader = new InputStreamReader(getResourceAsStream(resource)); } else { reader = new InputStreamReader(getResourceAsStream(resource), charset); } return reader; } Resources(); static ClassLoader getDefaultClassLoader(); static void setDefaultClassLoader(ClassLoader defaultClassLoader); static URL getResourceURL(String resource); static URL getResourceURL(ClassLoader loader, String resource); static InputStream getResourceAsStream(String resource); static InputStream getResourceAsStream(ClassLoader loader, String resource); static Properties getResourceAsProperties(String resource); static Properties getResourceAsProperties(ClassLoader loader, String resource); static Reader getResourceAsReader(String resource); static Reader getResourceAsReader(ClassLoader loader, String resource); static File getResourceAsFile(String resource); static File getResourceAsFile(ClassLoader loader, String resource); static InputStream getUrlAsStream(String urlString); static Reader getUrlAsReader(String urlString); static Properties getUrlAsProperties(String urlString); static Class<?> classForName(String className); static Charset getCharset(); static void setCharset(Charset charset); }
Resources { public static Reader getResourceAsReader(String resource) throws IOException { Reader reader; if (charset == null) { reader = new InputStreamReader(getResourceAsStream(resource)); } else { reader = new InputStreamReader(getResourceAsStream(resource), charset); } return reader; } Resources(); static ClassLoader getDefaultClassLoader(); static void setDefaultClassLoader(ClassLoader defaultClassLoader); static URL getResourceURL(String resource); static URL getResourceURL(ClassLoader loader, String resource); static InputStream getResourceAsStream(String resource); static InputStream getResourceAsStream(ClassLoader loader, String resource); static Properties getResourceAsProperties(String resource); static Properties getResourceAsProperties(ClassLoader loader, String resource); static Reader getResourceAsReader(String resource); static Reader getResourceAsReader(ClassLoader loader, String resource); static File getResourceAsFile(String resource); static File getResourceAsFile(ClassLoader loader, String resource); static InputStream getUrlAsStream(String urlString); static Reader getUrlAsReader(String urlString); static Properties getUrlAsProperties(String urlString); static Class<?> classForName(String className); static Charset getCharset(); static void setCharset(Charset charset);  }