MCPcopy Create free account
hub / github.com/antlr/codebuff / read

Method read

output/java_guava/1.4.17/CharSource.java:239–249  ·  view source on GitHub ↗

Reads the contents of this source as a string. @throws IOException if an I/O error occurs in the process of reading from this source

()

Source from the content-addressed store, hash-verified

237
238
239 public String read() throws IOException {
240 Closer closer = Closer.create();
241 try {
242 Reader reader = closer.register(openStream());
243 return CharStreams.toString(reader);
244 } catch (Throwable e) {
245 throw closer.rethrow(e);
246 } finally {
247 closer.close();
248 }
249 }
250
251 /**
252 * Reads the first link of this source as a string. Returns {@code null} if this source is empty.

Callers 1

isEmptyMethod · 0.45

Calls 6

createMethod · 0.95
registerMethod · 0.95
openStreamMethod · 0.95
toStringMethod · 0.95
rethrowMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected