@Test public void testReadAll() { String s = "line one\nline two\n"; InputStream input = new ByteArrayInputStream("line one\nline two\n".getBytes()); assertEquals(s, InterpolationProperties.readAll(input)); }
public static String readAll(InputStream input) { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringBuffer buffer = new StringBuffer(); while (true) { String line; try { line = reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { break; } else { buffer.append(line); buffer.append("\n"); } } return buffer.toString(); }
InterpolationProperties { public static String readAll(InputStream input) { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringBuffer buffer = new StringBuffer(); while (true) { String line; try { line = reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { break; } else { buffer.append(line); buffer.append("\n"); } } return buffer.toString(); } }
InterpolationProperties { public static String readAll(InputStream input) { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringBuffer buffer = new StringBuffer(); while (true) { String line; try { line = reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { break; } else { buffer.append(line); buffer.append("\n"); } } return buffer.toString(); } InterpolationProperties(Properties theProperties);  InterpolationProperties(String identifier);  InterpolationProperties(); }
InterpolationProperties { public static String readAll(InputStream input) { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringBuffer buffer = new StringBuffer(); while (true) { String line; try { line = reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { break; } else { buffer.append(line); buffer.append("\n"); } } return buffer.toString(); } InterpolationProperties(Properties theProperties);  InterpolationProperties(String identifier);  InterpolationProperties(); void setProperty(String propName, String value); String getProperty(String propName); String interpolate(String input); static String readAll(InputStream input); }
InterpolationProperties { public static String readAll(InputStream input) { BufferedReader reader = new BufferedReader(new InputStreamReader(input)); StringBuffer buffer = new StringBuffer(); while (true) { String line; try { line = reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { break; } else { buffer.append(line); buffer.append("\n"); } } return buffer.toString(); } InterpolationProperties(Properties theProperties);  InterpolationProperties(String identifier);  InterpolationProperties(); void setProperty(String propName, String value); String getProperty(String propName); String interpolate(String input); static String readAll(InputStream input);  }