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

Method openBufferedStream

guava/src/com/google/common/io/ByteSource.java:118–123  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

116 * @since 15.0 (in 14.0 with return type {@link BufferedInputStream})
117 */
118 public InputStream openBufferedStream() throws IOException {
119 InputStream in = openStream();
120 return (in instanceof BufferedInputStream)
121 ? (BufferedInputStream) in
122 : new BufferedInputStream(in);
123 }
124
125 /**
126 * 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