MCPcopy
hub / github.com/google/guava / read

Method read

guava/src/com/google/common/io/CharSource.java:290–300  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

288 * @throws IOException if an I/O error occurs while reading from this source
289 */
290 public String read() throws IOException {
291 Closer closer = Closer.create();
292 try {
293 Reader reader = closer.register(openStream());
294 return CharStreams.toString(reader);
295 } catch (Throwable e) {
296 throw closer.rethrow(e);
297 } finally {
298 closer.close();
299 }
300 }
301
302 /**
303 * Reads the first line 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