Package edu.caltech.nanodb.util
Class NoCopyByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- edu.caltech.nanodb.util.NoCopyByteArrayOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class NoCopyByteArrayOutputStream extends java.io.ByteArrayOutputStream
This class is a simple extension of Java'sByteArrayOutputStream
that exposes the internal buffer without having to make a copy of it via the normalByteArrayOutputStream.toByteArray()
method.
-
-
Constructor Summary
Constructors Constructor Description NoCopyByteArrayOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBuf()
Returns a reference to the internal byte-buffer used by this byte-array output stream.
-