@Test public void testReadFileForRegex() throws IOException { String actuals = reader.readFileForRegex(TEST_CLASS_WEB); assertEquals(expectedString, actuals); }
@Override public String readFileForRegex(String filePath) throws IOException { StringBuilder sb = new StringBuilder(); URL url = new URL(filePath); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); return sb.toString(); }
WebFileReader implements ContentReader { @Override public String readFileForRegex(String filePath) throws IOException { StringBuilder sb = new StringBuilder(); URL url = new URL(filePath); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); return sb.toString(); } }
WebFileReader implements ContentReader { @Override public String readFileForRegex(String filePath) throws IOException { StringBuilder sb = new StringBuilder(); URL url = new URL(filePath); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); return sb.toString(); }  }
WebFileReader implements ContentReader { @Override public String readFileForRegex(String filePath) throws IOException { StringBuilder sb = new StringBuilder(); URL url = new URL(filePath); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); return sb.toString(); }  @Override String readFileForRegex(String filePath); @Override List<String> readFileForStrComp(String filePath); }
WebFileReader implements ContentReader { @Override public String readFileForRegex(String filePath) throws IOException { StringBuilder sb = new StringBuilder(); URL url = new URL(filePath); BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } reader.close(); return sb.toString(); }  @Override String readFileForRegex(String filePath); @Override List<String> readFileForStrComp(String filePath);  }