SimpleTextReader implements Closeable { public LineIterator getLineIterator() throws IOException { return new LineIterator(getReader(), trim, filters); } SimpleTextReader(InputStream is, Template template);  SimpleTextReader(File file);  SimpleTextReader(File file, String encoding);  SimpleTextReader(String fileName);  SimpleTextReader(String fileName, String encoding);  SimpleTextReader(InputStream is);  SimpleTextReader(InputStream is, String encoding); static SimpleTextReader trimmingUTF8Reader(File file); static LineIterator trimmingUTF8LineIterator(File file); static IterableLineReader trimmingUTF8IterableLineReader(File file); static SimpleTextReader trimmingReader(InputStream is, String encoding); static LineIterator trimmingLineIterator(InputStream is, String encoding); static IterableLineReader trimmingIterableLineReader(InputStream is, String encoding); String getEncoding(); SimpleTextReader cloneForStream(InputStream is); SimpleTextReader cloneForFile(File file); byte[] asByteArray(); String asString(); List<String> asStringList(); IterableLineReader getIterableReader(); LineIterator getLineIterator(); long countLines(); void close();  }
@Test public void lineIteratorTest2() throws IOException { LineIterator li = new SimpleTextReader("test/multi_line_text_file.txt").getLineIterator(); while (li.hasNext()) out.println(li.next().toUpperCase()); IOs.closeSilently(li); }
@Test public void lineIteratorWithConstraint() throws IOException { LineIterator li = new SimpleTextReader .Builder("test/multi_line_text_file.txt") .ignoreWhiteSpaceLines() .trim() .build().getLineIterator(); int i = 0; while (li.hasNext()) { String s = li.next(); if (i == 0) assertEquals(s, "uno"); if (i == 1) assertEquals(s, "dos"); i++; } IOs.closeSilently(li); }