Code example for Scanner

Methods: hasNext, nextLine

0
      out = out.trim();
      return out;
   } 
 
   private static String getNextLine(Scanner scanner) {
      String out = scanner.hasNext() ? scanner.nextLine() : "";
      if (out == null) {
         out = "";
      } 
      out = out.replaceAll("\\n", "");
      out = out.replaceAll(dp, "'");
      out = out.trim();
      return out;
   } 
 
   private static void save(String level, String clazz, String clazzMessage, String exception, String exceptionMessage, String at) throws IOException {
      // write our file. 
      fos.write('"');
      fos.write(level.getBytes());
      fos.write("\",\"".getBytes());
      fos.write(clazz.getBytes());