Advertisement
SchrodZzz

FastSc

Oct 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStream;
  4. import java.io.InputStreamReader;
  5.  
  6. public class FastScanner {
  7.     private BufferedReader in;
  8.  
  9.     FastScanner(InputStream stream) {
  10.         in = new BufferedReader(new InputStreamReader(stream));
  11.     }
  12.  
  13.     String nextLine() throws IOException {
  14.         return in.readLine();
  15.     }
  16.  
  17.     boolean hasNextLine() throws IOException {
  18.         return in.ready();
  19.     }
  20.     void close() throws IOException{
  21.         in.close();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement