Advertisement
Danielto2000

Untitled

Oct 16th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1.  public String nextLine() {
  2.         try {
  3.             current = (byte) in.read();
  4.             StringBuilder line = new StringBuilder();
  5.             while (current != '\n') {
  6.                 line.append((char) current);
  7.                 current = (byte) in.read();
  8.             }
  9.             return line.toString();
  10.         } catch (IOException ex) {
  11.             return null;
  12.         }
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement