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

Method asOutputStream

corpus/java/training/guava/hash/Funnels.java:236–238  ·  view source on GitHub ↗

Wraps a PrimitiveSink as an OutputStream, so it is easy to Funnel#funnel funnel an object to a PrimitiveSink if there is already a way to write the contents of the object to an OutputStream. The close and flush methods of the returned {@cod

(PrimitiveSink sink)

Source from the content-addressed store, hash-verified

234 * @since 13.0
235 */
236 public static OutputStream asOutputStream(PrimitiveSink sink) {
237 return new SinkAsStream(sink);
238 }
239
240 private static class SinkAsStream extends OutputStream {
241 final PrimitiveSink sink;

Callers 1

hashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected