code: 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]);
      }
docs: Reads all lines and return as a String array.
  
  @return The String array.
  
  @throws IOException If an I/O error occurs.