Allows read access to the internal byte array, avoiding the need copy/extract to a java.io.ByteArrayOutputStream. @since 0.12.2
| 27 | * @since 0.12.2 |
| 28 | */ |
| 29 | public final class BytesInputStream extends ByteArrayInputStream { |
| 30 | |
| 31 | BytesInputStream(byte[] buf) { |
| 32 | super(Bytes.isEmpty(buf) ? Bytes.EMPTY : buf); |
| 33 | } |
| 34 | |
| 35 | public byte[] getBytes() { |
| 36 | return this.buf; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public void close() throws IOException { |
| 41 | reset(); |
| 42 | } |
| 43 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…