Package org.h2.compress
Class LZFInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.h2.compress.LZFInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class LZFInputStream extends java.io.InputStreamAn input stream to read from an LZF stream. The data is automatically expanded.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]bufferprivate intbufferLengthprivate CompressLZFdecompressprivate java.io.InputStreaminprivate byte[]inBufferprivate intpos
-
Constructor Summary
Constructors Constructor Description LZFInputStream(java.io.InputStream in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private static byte[]ensureSize(byte[] buff, int len)private voidfillBuffer()intread()intread(byte[] b)intread(byte[] b, int off, int len)private intreadBlock(byte[] b, int off, int len)private voidreadFully(byte[] buff, int len)private intreadInt()
-
-
-
Field Detail
-
in
private final java.io.InputStream in
-
decompress
private CompressLZF decompress
-
pos
private int pos
-
bufferLength
private int bufferLength
-
inBuffer
private byte[] inBuffer
-
buffer
private byte[] buffer
-
-
Method Detail
-
ensureSize
private static byte[] ensureSize(byte[] buff, int len)
-
fillBuffer
private void fillBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
readFully
private void readFully(byte[] buff, int len) throws java.io.IOException- Throws:
java.io.IOException
-
readInt
private int readInt() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
readBlock
private int readBlock(byte[] b, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-