List of utility methods to do BufferedReader Read Line
String | readLine(File file) read Line try (BufferedReader br = new BufferedReader(new FileReader(file))) { return br.readLine(); |
String | readLine(File file, int lineNumber) Reads a line from the specified file and lineNumber. List<String> records = readRecords(file);
return records.get(lineNumber);
|
List | readLine(InputStream in) read Line return readLine(in, "utf-8"); |
String | readLine(InputStream in) read Line final BufferedReader reader = new BufferedReader(new InputStreamReader(in)); final StringBuilder out = new StringBuilder(); final String newLine = System.getProperty("line.separator"); String line; try { while ((line = reader.readLine()) != null) { out.append(line); out.append(newLine); ... |
String | readLine(InputStream input) Cheesy method which lets us read from an InputStream without having to instantiate a BufferedReader. StringBuilder buf = new StringBuilder(); int c; while ((c = input.read()) >= 0 && c != '\n') { buf.append((char) c); return c >= 0 ? buf.toString() : null; |
String | readLine(InputStream input) Cheesy method which lets us read from an InputStream without having to instantiate a BufferedReader. StringBuilder buf = new StringBuilder(); int c; while ((c = input.read()) >= 0 && c != '\n') { buf.append((char) c); return c >= 0 ? buf.toString() : null; |
String | readLine(RandomAccessFile wiki) read Line long start = wiki.getFilePointer(); wiki.readLine(); long end = wiki.getFilePointer(); wiki.seek(start); byte[] b = new byte[(int) (end - start)]; wiki.read(b); return new String(b).replace(System.lineSeparator(), ""); |
String | readLine(Reader rd) Read a line from an InputStream in human-readable-form as a String. String input = ""; while (!Thread.interrupted()) { int ch = rd.read(); if (ch == -1) if ("".equals(input)) return null; else break; ... |
String | readLine(String fileName) read Line FileReader fr = new FileReader(fileName); BufferedReader br = new BufferedReader(fr); return br.readLine(); |
String | readLine(String fileName) read Line if (fileName == null) { return null; BufferedReader in = null; try { in = new BufferedReader(new FileReader(fileName)); String str = in.readLine(); if (str != null) { ... |