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

Method read

corpus/java/training/guava/io/CharSource.java:231–241  ·  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

229 * @throws IOException if an I/O error occurs in the process of reading from this source
230 */
231 public String read() throws IOException {
232 Closer closer = Closer.create();
233 try {
234 Reader reader = closer.register(openStream());
235 return CharStreams.toString(reader);
236 } catch (Throwable e) {
237 throw closer.rethrow(e);
238 } finally {
239 closer.close();
240 }
241 }
242
243 /**
244 * 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