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

Method openBufferedStream

corpus/java/training/guava/io/ByteSource.java:105–110  ·  view source on GitHub ↗

Opens a new buffered InputStream for reading from this source. The returned stream is not required to be a BufferedInputStream in order to allow implementations to simply delegate to #openStream() when the stream returned by that method does not benefit from additional buffer

()

Source from the content-addressed store, hash-verified

103 * @since 15.0 (in 14.0 with return type {@link BufferedInputStream})
104 */
105 public InputStream openBufferedStream() throws IOException {
106 InputStream in = openStream();
107 return (in instanceof BufferedInputStream)
108 ? (BufferedInputStream) in
109 : new BufferedInputStream(in);
110 }
111
112 /**
113 * Returns a view of a slice of this byte source that is at most {@code length} bytes long

Callers 1

openBufferedStreamMethod · 0.45

Calls 1

openStreamMethod · 0.95

Tested by

no test coverage detected