Package org.h2.compress
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 int
The file header of a LZF file.private final OutputStream
private byte[]
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
compressAndWrite
(byte[] buff, int len) private void
ensureOutput
(int len) void
flush()
void
write
(byte[] buff, int off, int len) void
write
(int b) private void
writeInt
(int x) Methods inherited from class java.io.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:
write
in classOutputStream
- Throws:
IOException
-
compressAndWrite
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-