Class TestableByteArrayInputStream (1.41.8)

public class TestableByteArrayInputStream extends ByteArrayInputStream

Beta
Testable extension for a byte array input stream.

Inheritance

java.lang.Object > java.io.InputStream > ByteArrayInputStream > TestableByteArrayInputStream

Constructors

TestableByteArrayInputStream(byte[] buf)

public TestableByteArrayInputStream(byte[] buf)
Parameter
NameDescription
bufbyte[]

buffer

TestableByteArrayInputStream(byte[] buf, int offset, int length)

public TestableByteArrayInputStream(byte[] buf, int offset, int length)
Parameters
NameDescription
bufbyte[]

buffer

offsetint

offset in the buffer of the first byte to read

lengthint

maximum number of bytes to read from the buffer

Methods

close()

public void close()

Overriding is supported, but overriding method must call the super implementation.

Overrides Exceptions
TypeDescription
IOException

getBuffer()

public final byte[] getBuffer()

Returns the written buffer value as a modifiable byte array.

Returns
TypeDescription
byte[]

isClosed()

public final boolean isClosed()

Returns whether the output stream has been closed.

Returns
TypeDescription
boolean