MCPcopy Index your code
hub / github.com/antlr/codebuff / readFirstLine

Method readFirstLine

output/java_guava/1.4.17/CharSource.java:261–272  ·  view source on GitHub ↗

Reads the first link of this source as a string. Returns null if this source is empty. Like BufferedReader, this method breaks lines on any of \n, \r or \r\n, does not include the line separator in the returned line and does not consider there to be an ext

()

Source from the content-addressed store, hash-verified

259 */
260
261 @Nullable
262 public String readFirstLine() throws IOException {
263 Closer closer = Closer.create();
264 try {
265 BufferedReader reader = closer.register(openBufferedStream());
266 return reader.readLine();
267 } catch (Throwable e) {
268 throw closer.rethrow(e);
269 } finally {
270 closer.close();
271 }
272 }
273
274 /**
275 * Reads all the lines of this source as a list of strings. The returned list will be empty if

Callers

nothing calls this directly

Calls 6

createMethod · 0.95
registerMethod · 0.95
openBufferedStreamMethod · 0.95
rethrowMethod · 0.95
closeMethod · 0.95
readLineMethod · 0.65

Tested by

no test coverage detected