Class LZFOutputStream
java.lang.Object
java.io.OutputStream
org.h2.compress.LZFOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
An output stream to write an LZF stream.
The data is automatically compressed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final CompressLZF(package private) static final intThe file header of a LZF file.private final OutputStreamprivate byte[]private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voidcompressAndWrite(byte[] buff, int len) private voidensureOutput(int len) voidflush()voidwrite(byte[] buff, int off, int len) voidwrite(int b) private voidwriteInt(int x) Methods inherited from class OutputStream
nullOutputStream, write
-
Field Details
-
MAGIC
static final int MAGICThe file header of a LZF file.- See Also:
-
out
-
compress
-
buffer
private final byte[] buffer -
pos
private int pos -
outBuffer
private byte[] outBuffer
-
-
Constructor Details
-
LZFOutputStream
- Throws:
IOException
-
-
Method Details
-
ensureOutput
private void ensureOutput(int len) -
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
compressAndWrite
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-