com.partnersoft.v3x.io
Class BufferPoolingInflaterInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.util.zip.InflaterInputStream
com.partnersoft.v3x.io.BufferPoolingInflaterInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class BufferPoolingInflaterInputStream
- extends java.util.zip.InflaterInputStream
An implementation of InflaterInputStream that utilizes pooled buffers.
Presumably this makes it more efficient (both memory and speed).
Unfortunately, java.util.zip.InflaterInputStream does not have a constructor
that allows me to skip allocating their buffer, so I just allocate a single
byte one. Maybe that doesn't screw us up, who knows.
| Fields inherited from class java.util.zip.InflaterInputStream |
buf, inf, len |
| Fields inherited from class java.io.FilterInputStream |
in |
|
Method Summary |
void |
close()
|
protected byte[] |
getBuffer()
Used by CompressionSwitchingInputStream. |
protected java.util.zip.Inflater |
getInflater()
Used by CompressionSwitchingInputStream. |
| Methods inherited from class java.util.zip.InflaterInputStream |
available, fill, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.io.FilterInputStream |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferPoolingInflaterInputStream
public BufferPoolingInflaterInputStream(java.io.InputStream innie)
BufferPoolingInflaterInputStream
public BufferPoolingInflaterInputStream(java.io.InputStream innie,
java.util.zip.Inflater inflater)
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.util.zip.InflaterInputStream
- Throws:
java.io.IOException
getBuffer
protected byte[] getBuffer()
- Used by CompressionSwitchingInputStream.
getInflater
protected java.util.zip.Inflater getInflater()
- Used by CompressionSwitchingInputStream.