Package net.i2p.util
Class CachingByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- net.i2p.util.CachingByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
@Deprecated public class CachingByteArrayOutputStream extends ByteArrayOutputStream
Deprecated.unusedsimple extension to the baos to try to use a ByteCache for its internal buffer. This caching only works when the array size provided is sufficient for the entire buffer. After doing what needs to be done (e.g. write(foo); toByteArray();), call releaseBuffer to put the buffer back into the cache.
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description CachingByteArrayOutputStream(int cacheQuantity, int arraySize)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
releaseBuffer()
Deprecated.-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-