Class FastByteArrayOutputStream

java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
VASSAL.tools.io.FastByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class FastByteArrayOutputStream extends ByteArrayOutputStream
A ByteArrayOutputStream which does not retain its byte buffer, and can produce an InputStream sharing the same byte buffer. The advantage of this is that the byte buffer can be shared between the output and input, and provides better performance when the stream will be used only a single time and the buffer is full when toByteArray() is called.
Since:
3.1.0
Author:
Joel Uckelman