forked from I2P_Developers/i2p.i2p
javadoc clarifications
This commit is contained in:
@@ -9,9 +9,8 @@ import java.util.concurrent.LinkedBlockingQueue;
|
||||
import net.i2p.data.DataHelper;
|
||||
|
||||
/**
|
||||
* Provide a cache of reusable GZIP streams, each handling up to 32KB without
|
||||
* expansion.
|
||||
*
|
||||
* Provide a cache of reusable GZIP unzipper streams.
|
||||
* This provides stream output only, and therefore can handle unlimited size.
|
||||
*/
|
||||
public class ReusableGZIPInputStream extends ResettableGZIPInputStream {
|
||||
// Apache Harmony 5.0M13 Deflater doesn't work after reset()
|
||||
|
||||
@@ -14,6 +14,9 @@ import net.i2p.data.DataHelper;
|
||||
*
|
||||
* This compresses to memory only. Retrieve the compressed data with getData().
|
||||
* There is no facility to compress to an output stream.
|
||||
*
|
||||
* Do NOT use this for compression of unlimited-size data, as it will
|
||||
* expand, but never release, the BAOS memory buffer.
|
||||
*/
|
||||
public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream {
|
||||
// Apache Harmony 5.0M13 Deflater doesn't work after reset()
|
||||
@@ -51,10 +54,10 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream {
|
||||
_available.offer(out);
|
||||
}
|
||||
|
||||
private ByteArrayOutputStream _buffer = null;
|
||||
private final ByteArrayOutputStream _buffer;
|
||||
|
||||
private ReusableGZIPOutputStream() {
|
||||
super(new ByteArrayOutputStream(40*1024));
|
||||
super(new ByteArrayOutputStream(DataHelper.MAX_UNCOMPRESSED));
|
||||
_buffer = (ByteArrayOutputStream)out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user