@Test public void testGetUTF8ResourceAsString() { try { String result = IOUtil.getUTF8ResourceAsString("/org/yarnandtail/andhow/util/IOUtilTest_ExampleFile.txt"); assertEquals(EXAMPLE_FILE_CONTENT, result); } catch (IOException e) { fail("Should not fail"); } }
public static String getUTF8ResourceAsString(String path) throws IOException { InputStream in = IOUtil.class.getResourceAsStream(path); if (in == null) { throw new IOException("Unable to find the resource '" + path + "'"); } return toString(in, Charset.forName("UTF-8")); }
IOUtil { public static String getUTF8ResourceAsString(String path) throws IOException { InputStream in = IOUtil.class.getResourceAsStream(path); if (in == null) { throw new IOException("Unable to find the resource '" + path + "'"); } return toString(in, Charset.forName("UTF-8")); } }
IOUtil { public static String getUTF8ResourceAsString(String path) throws IOException { InputStream in = IOUtil.class.getResourceAsStream(path); if (in == null) { throw new IOException("Unable to find the resource '" + path + "'"); } return toString(in, Charset.forName("UTF-8")); } private  IOUtil(); }
IOUtil { public static String getUTF8ResourceAsString(String path) throws IOException { InputStream in = IOUtil.class.getResourceAsStream(path); if (in == null) { throw new IOException("Unable to find the resource '" + path + "'"); } return toString(in, Charset.forName("UTF-8")); } private  IOUtil(); static String getUTF8ResourceAsString(String path); static String getResourceAsString(String path, Charset encoding); static String toString(InputStream input, Charset encoding); static String expandDirectoryPath(String path); static String expandFilePath(String path); }
IOUtil { public static String getUTF8ResourceAsString(String path) throws IOException { InputStream in = IOUtil.class.getResourceAsStream(path); if (in == null) { throw new IOException("Unable to find the resource '" + path + "'"); } return toString(in, Charset.forName("UTF-8")); } private  IOUtil(); static String getUTF8ResourceAsString(String path); static String getResourceAsString(String path, Charset encoding); static String toString(InputStream input, Charset encoding); static String expandDirectoryPath(String path); static String expandFilePath(String path);  }