Add close method to clean up work space
This commit is contained in:
parent
4281128209
commit
da64065e18
|
@ -51,6 +51,14 @@ public class SnappyInputStream extends InputStream
|
||||||
readHeader();
|
readHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
compressed = null;
|
||||||
|
uncompressed = null;
|
||||||
|
if (in != null)
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
|
||||||
protected void readHeader() throws IOException {
|
protected void readHeader() throws IOException {
|
||||||
byte[] header = new byte[SnappyCodec.headerSize()];
|
byte[] header = new byte[SnappyCodec.headerSize()];
|
||||||
int readBytes = in.read(header, 0, header.length);
|
int readBytes = in.read(header, 0, header.length);
|
||||||
|
|
Loading…
Reference in New Issue