List of utility methods to do BufferedReader Read Line
String | readLine() read Line try { return new BufferedReader(new InputStreamReader(System.in)).readLine(); } catch (IOException e) { throw new RuntimeException(e); |
String | readLine() read Line BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String code = br.readLine(); br.close(); return code != null ? code.trim() : ""; |
String | readLine() read Line try { return br.readLine(); } catch (IOException ioe) { return ""; |
void | readLine() read Line try { new BufferedReader(new InputStreamReader(System.in)).readLine(); } catch (IOException e) { throw new RuntimeException(e); |
String | readLine() read Line String string = ""; InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(input); try { string = reader.readLine(); } catch (Exception e) { e.printStackTrace(); return string; |
String | readLine() Reads a line from standard input try { return in.readLine(); } catch (final IOException e) { throw new RuntimeException(e); |
String | readLine() read Line String result = ""; try { result = INPUT_READER.readLine(); } catch (IOException e) { e.printStackTrace(); return result; |
String | readLine() read Line return consoleReader.readLine();
|
String | readLine(BufferedReader br) read Line String str = null; str = br.readLine(); if (str == null) { str = EOF; return str; |
String | readLine(BufferedReader br, int maxlen) Reads the next non-empty line of text from a buffered reader, up to a given number of characters. StringBuilder s = new StringBuilder(); for (int i = 0; i < maxlen; i++) { int c = br.read(); if (c == -1) { if (s.length() == 0) return null; break; if (c == '\n' || c == '\r') { if (s.length() == 0) continue; break; s.appendCodePoint(c); return s.toString(); |