@Test public void testReadLines() { File testDir = new File( "src/test/resources/" ); File testFile = new File( testDir, "testfile.txt" ); List<String> lines = IO.readLines( testFile ); assertLines( lines ); }
public static List<String> readLines( Reader reader ) { try ( BufferedReader bufferedReader = new BufferedReader( reader ) ) { return readLines( bufferedReader ); } catch ( Exception ex ) { return Exceptions.handle( List.class, ex ); } }
IO { public static List<String> readLines( Reader reader ) { try ( BufferedReader bufferedReader = new BufferedReader( reader ) ) { return readLines( bufferedReader ); } catch ( Exception ex ) { return Exceptions.handle( List.class, ex ); } } }
IO { public static List<String> readLines( Reader reader ) { try ( BufferedReader bufferedReader = new BufferedReader( reader ) ) { return readLines( bufferedReader ); } catch ( Exception ex ) { return Exceptions.handle( List.class, ex ); } }  }
IO { public static List<String> readLines( Reader reader ) { try ( BufferedReader bufferedReader = new BufferedReader( reader ) ) { return readLines( bufferedReader ); } catch ( Exception ex ) { return Exceptions.handle( List.class, ex ); } }  static FileSystem zipFileSystem( URI fileJarURI ); static List<String> list( final Path path ); static List<Path> listPath( final Path path ); static List<String> listByGlob( final String path, final String glob ); static List<String> listByGlob( Path pathFromFileSystem, String glob ); static List<String> listByFileExtension( final String path, final String ext ); static List<String> listByFileExtension( final Path pathFromFileSystem, final String ext ); static List<String> listByFileExtensionRecursive( final String path, final String ext ); static List<String> listByFileExtensionRecursive( final Path pathFromFileSystem, final String ext ); static String readChild( Path parentDir, String childFileName ); static char[] readCharBuffer( Path path ); static String read( InputStream inputStream, Charset charset ); static String read( InputStream inputStream, String charset ); static String readCharBuffer( InputStream inputStream, Charset charset ); static String read( InputStream inputStream ); static char[] readCharBuffer( InputStream inputStream ); static CharBuf read( InputStream inputStream, CharBuf charBuf ); static CharBuf read( InputStream inputStream, CharBuf charBuf, Charset charset ); static CharBuf read( InputStream inputStream, CharBuf charBuf, Charset charset, int bufSize, char[] copyBuf ); static byte[] input( String fileName ); static byte[] input( InputStream inputStream ); static long copyLarge( Reader reader, Writer writer ); static long copyLarge( Reader reader, Writer writer, char[] buffer ); static String read( Reader input ); static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ); static CharBuf read( Reader input, CharBuf charBuf ); static char[] readCharBuffer( Reader input ); static int copy( Reader input, Writer output ); static int copy( Reader input, Writer output, char[] copyBuf ); static char[] readCharBuffer( Reader reader, int size ); static String read( File file ); static List<String> readLines( Reader reader ); static void eachLine( Reader reader, EachLine eachLine ); static List<String> readLines( InputStream is ); static void eachLine( InputStream is, EachLine eachLine ); static List<String> readLines( BufferedReader reader ); static void eachLine( BufferedReader reader, EachLine eachLine ); static void eachLine( File file, EachLine eachLine ); static List<String> readLines( File file ); static List<String> readLines( final String location ); static URI createURI( final String path ); static void eachLine( final String location, final EachLine eachLine ); static String read( final Path path ); static String readPath( final Path path ); static String read( final String location ); static String readResource( final String location ); static Path uriToPath( URI uri ); static void write( OutputStream out, String content, Charset charset ); static void writeChild( Path parentDir, String childFileName, String childContents ); static Path createChildDirectory( Path parentDir, String childDir ); static Path createDirectory( Path dir ); static Path createDirectory( String dir ); static FileSystem fileSystem(); static Path path( String path, String... more ); static Path path( Path path, String... more ); static void write( Path file, String contents ); static void write( String file, String contents ); static void output( String file, byte[] bytes ); static void output( Path file, byte[] bytes ); static void write( String file, byte[] contents ); static void write( Path file, byte[] contents ); static void write( OutputStream out, String content ); static void writeNoClose( OutputStream out, String content ); static String readFromClasspath( Class<?> clazz, String location ); static Path path( String location ); static String readFromClasspath( String location ); static InputStream inputStream( String resource ); static List<String> list( final String path ); static List<Path> paths( final String path ); static List<Path> pathsByExt( final String path, String ext ); static List<Path> paths( final Path path ); static List<String> listByExt( final String path, String ext ); static void delete(Path path); static void createDirectories(Path path); static void delete(String path); static void createDirectories(String path); static boolean exists(Path path ); static boolean exists(String path ); static void move(Path source, Path target); }
IO { public static List<String> readLines( Reader reader ) { try ( BufferedReader bufferedReader = new BufferedReader( reader ) ) { return readLines( bufferedReader ); } catch ( Exception ex ) { return Exceptions.handle( List.class, ex ); } }  static FileSystem zipFileSystem( URI fileJarURI ); static List<String> list( final Path path ); static List<Path> listPath( final Path path ); static List<String> listByGlob( final String path, final String glob ); static List<String> listByGlob( Path pathFromFileSystem, String glob ); static List<String> listByFileExtension( final String path, final String ext ); static List<String> listByFileExtension( final Path pathFromFileSystem, final String ext ); static List<String> listByFileExtensionRecursive( final String path, final String ext ); static List<String> listByFileExtensionRecursive( final Path pathFromFileSystem, final String ext ); static String readChild( Path parentDir, String childFileName ); static char[] readCharBuffer( Path path ); static String read( InputStream inputStream, Charset charset ); static String read( InputStream inputStream, String charset ); static String readCharBuffer( InputStream inputStream, Charset charset ); static String read( InputStream inputStream ); static char[] readCharBuffer( InputStream inputStream ); static CharBuf read( InputStream inputStream, CharBuf charBuf ); static CharBuf read( InputStream inputStream, CharBuf charBuf, Charset charset ); static CharBuf read( InputStream inputStream, CharBuf charBuf, Charset charset, int bufSize, char[] copyBuf ); static byte[] input( String fileName ); static byte[] input( InputStream inputStream ); static long copyLarge( Reader reader, Writer writer ); static long copyLarge( Reader reader, Writer writer, char[] buffer ); static String read( Reader input ); static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ); static CharBuf read( Reader input, CharBuf charBuf ); static char[] readCharBuffer( Reader input ); static int copy( Reader input, Writer output ); static int copy( Reader input, Writer output, char[] copyBuf ); static char[] readCharBuffer( Reader reader, int size ); static String read( File file ); static List<String> readLines( Reader reader ); static void eachLine( Reader reader, EachLine eachLine ); static List<String> readLines( InputStream is ); static void eachLine( InputStream is, EachLine eachLine ); static List<String> readLines( BufferedReader reader ); static void eachLine( BufferedReader reader, EachLine eachLine ); static void eachLine( File file, EachLine eachLine ); static List<String> readLines( File file ); static List<String> readLines( final String location ); static URI createURI( final String path ); static void eachLine( final String location, final EachLine eachLine ); static String read( final Path path ); static String readPath( final Path path ); static String read( final String location ); static String readResource( final String location ); static Path uriToPath( URI uri ); static void write( OutputStream out, String content, Charset charset ); static void writeChild( Path parentDir, String childFileName, String childContents ); static Path createChildDirectory( Path parentDir, String childDir ); static Path createDirectory( Path dir ); static Path createDirectory( String dir ); static FileSystem fileSystem(); static Path path( String path, String... more ); static Path path( Path path, String... more ); static void write( Path file, String contents ); static void write( String file, String contents ); static void output( String file, byte[] bytes ); static void output( Path file, byte[] bytes ); static void write( String file, byte[] contents ); static void write( Path file, byte[] contents ); static void write( OutputStream out, String content ); static void writeNoClose( OutputStream out, String content ); static String readFromClasspath( Class<?> clazz, String location ); static Path path( String location ); static String readFromClasspath( String location ); static InputStream inputStream( String resource ); static List<String> list( final String path ); static List<Path> paths( final String path ); static List<Path> pathsByExt( final String path, String ext ); static List<Path> paths( final Path path ); static List<String> listByExt( final String path, String ext ); static void delete(Path path); static void createDirectories(Path path); static void delete(String path); static void createDirectories(String path); static boolean exists(Path path ); static boolean exists(String path ); static void move(Path source, Path target); final static Charset DEFAULT_CHARSET; final static String FILE_SCHEMA; final static String JAR_SCHEMA; final static String CLASSPATH_SCHEMA; final static String JAR_FILE_SCHEMA; static ConvertToPathFunction convertToPathFunction; }