Package kilim.nio
Class ExposedBaos
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- kilim.nio.ExposedBaos
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ExposedBaos extends java.io.ByteArrayOutputStreamA hack that exposes the bytearray inside the ByteArrayOutputStream. This is to avoid copying the byte array when toByteArray() is called.
-
-
Constructor Summary
Constructors Constructor Description ExposedBaos()ExposedBaos(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetCount(int n)byte[]toByteArray()java.nio.ByteBuffertoByteBuffer()
-