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

Method copyTo

output/java_guava/1.4.17/ByteSource.java:255–267  ·  view source on GitHub ↗

Copies the contents of this byte source to the given OutputStream. Does not close output. @return the number of bytes copied @throws IOException if an I/O error occurs in the process of reading from this source or writing to output

(OutputStream output)

Source from the content-addressed store, hash-verified

253 */
254
255 @CanIgnoreReturnValue
256 public long copyTo(OutputStream output) throws IOException {
257 checkNotNull(output);
258 Closer closer = Closer.create();
259 try {
260 InputStream in = closer.register(openStream());
261 return ByteStreams.copy(in, output);
262 } catch (Throwable e) {
263 throw closer.rethrow(e);
264 } finally {
265 closer.close();
266 }
267 }
268
269 /**
270 * Copies the contents of this byte source to the given {@code ByteSink}.

Callers 3

hashMethod · 0.95
copyMethod · 0.45
copyMethod · 0.45

Calls 7

createMethod · 0.95
registerMethod · 0.95
openStreamMethod · 0.95
copyMethod · 0.95
rethrowMethod · 0.95
closeMethod · 0.95
checkNotNullMethod · 0.45

Tested by

no test coverage detected