mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-04 04:34:29 +02:00
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…
x
Reference in New Issue
Block a user