Package kilim.nio
Class ExposedBais
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
kilim.nio.ExposedBais
- All Implemented Interfaces:
Closeable,AutoCloseable
A hack that exposes the bytearray inside the ByteArrayInputStream. This is to
avoid copying the byte array when toByteArray() is called
-
Field Summary
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos -
Constructor Summary
ConstructorsConstructorDescriptionExposedBais(byte[] buf) ExposedBais(byte[] buf, int offset, int length) ExposedBais(int size) -
Method Summary
Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferToMethods inherited from class java.io.InputStream
nullInputStream, read, readNBytes, skipNBytes
-
Constructor Details
-
ExposedBais
public ExposedBais(int size) -
ExposedBais
public ExposedBais(byte[] buf, int offset, int length) -
ExposedBais
public ExposedBais(byte[] buf)
-
-
Method Details
-
toByteArray
public byte[] toByteArray() -
setCount
public void setCount(int n)
-