Class TestableByteArrayInputStream

  • All Implemented Interfaces:
    Closeable

    @Beta
    public class TestableByteArrayInputStream
    extends ByteArrayInputStream
    Beta
    Testable extension for a byte array input stream.
    Since:
    1.14
    Author:
    Yaniv Inbar
    • Constructor Detail

      • TestableByteArrayInputStream

        public TestableByteArrayInputStream​(byte[] buf)
        Parameters:
        buf - buffer
      • TestableByteArrayInputStream

        public TestableByteArrayInputStream​(byte[] buf,
                                            int offset,
                                            int length)
        Parameters:
        buf - buffer
        offset - offset in the buffer of the first byte to read
        length - maximum number of bytes to read from the buffer
    • Method Detail

      • getBuffer

        public final byte[] getBuffer()
        Returns the written buffer value as a modifiable byte array.
      • isClosed

        public final boolean isClosed()
        Returns whether the output stream has been closed.