Constructor and Description |
---|
TestableByteArrayInputStream(byte[] buf) |
TestableByteArrayInputStream(byte[] buf,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
byte[] |
getBuffer()
Returns the written buffer value as a modifiable byte array.
|
boolean |
isClosed()
Returns whether the output stream has been closed.
|
public TestableByteArrayInputStream(byte[] buf)
buf
- bufferpublic TestableByteArrayInputStream(byte[] buf, int offset, int length)
buf
- bufferoffset
- offset in the buffer of the first byte to readlength
- maximum number of bytes to read from the bufferpublic void close() throws java.io.IOException
Overriding is supported, but overriding method must call the super implementation.
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.ByteArrayInputStream
java.io.IOException
public final byte[] getBuffer()
public final boolean isClosed()
Copyright © 2011-2018 Google. All Rights Reserved.