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
()
| 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 |
no test coverage detected