public String [ ] readLines ( ) throws IOException { List < String > list = new ArrayList < String > ( ) ; String line ; while ( ( line = readLine ( ) ) != null ) { list . add ( line ) ; } return list . toArray ( new String [ 0 ] ) ; }
Reads all lines and return as a String array .