@Test public void testAsString() { String expected = "hello\nworld\n"; String actual = Resources.asString("resources-test/hello.txt"); assertEquals(expected, actual); }
public static String asString(String resource) { URL url = com.google.common.io.Resources.getResource(resource); try { return com.google.common.io.Resources.toString(url, Charsets.UTF_8); } catch (IOException ex) { throw new RuntimeException(ex); } }
Resources { public static String asString(String resource) { URL url = com.google.common.io.Resources.getResource(resource); try { return com.google.common.io.Resources.toString(url, Charsets.UTF_8); } catch (IOException ex) { throw new RuntimeException(ex); } } }
Resources { public static String asString(String resource) { URL url = com.google.common.io.Resources.getResource(resource); try { return com.google.common.io.Resources.toString(url, Charsets.UTF_8); } catch (IOException ex) { throw new RuntimeException(ex); } }  }
Resources { public static String asString(String resource) { URL url = com.google.common.io.Resources.getResource(resource); try { return com.google.common.io.Resources.toString(url, Charsets.UTF_8); } catch (IOException ex) { throw new RuntimeException(ex); } }  static String asString(String resource); static BufferedReader asBufferedReader(String resource); }
Resources { public static String asString(String resource) { URL url = com.google.common.io.Resources.getResource(resource); try { return com.google.common.io.Resources.toString(url, Charsets.UTF_8); } catch (IOException ex) { throw new RuntimeException(ex); } }  static String asString(String resource); static BufferedReader asBufferedReader(String resource);  }