net.i2p.util
Class CachingByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by net.i2p.util.CachingByteArrayOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

Deprecated. unused

public class CachingByteArrayOutputStream
extends java.io.ByteArrayOutputStream

simple 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
CachingByteArrayOutputStream(int cacheQuantity, int arraySize)
          Deprecated.  
 
Method Summary
 void releaseBuffer()
          Deprecated.  
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachingByteArrayOutputStream

public CachingByteArrayOutputStream(int cacheQuantity,
                                    int arraySize)
Deprecated. 
Method Detail

releaseBuffer

public void releaseBuffer()
Deprecated.