public class LZ4FrameOutputStream
extends java.io.FilterOutputStream
Not Supported:
Originally based on kafka's KafkaLZ4BlockOutputStream.
| Modifier and Type | Class and Description |
|---|---|
static class |
LZ4FrameOutputStream.BD |
static class |
LZ4FrameOutputStream.BLOCKSIZE |
static class |
LZ4FrameOutputStream.FLG |
| Constructor and Description |
|---|
LZ4FrameOutputStream(java.io.OutputStream out)
Creates a new
OutputStream that will compress data using the LZ4 algorithm with 4-MB blocks. |
LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize)
Creates a new
OutputStream that will compress data using the LZ4 algorithm. |
LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
long knownSize,
LZ4Compressor compressor,
XXHash32 checksum,
LZ4FrameOutputStream.FLG.Bits... bits)
Creates a new
OutputStream that will compress data using the specified instances of LZ4Compressor and XXHash32. |
LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
long knownSize,
LZ4FrameOutputStream.FLG.Bits... bits)
Creates a new
OutputStream that will compress data using using fastest instances of LZ4Compressor and XXHash32. |
LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
LZ4FrameOutputStream.FLG.Bits... bits)
Creates a new
OutputStream that will compress data of unknown size using the LZ4 algorithm. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
LZ4FrameOutputStream.FLG.Bits... bits)
throws java.io.IOException
OutputStream that will compress data of unknown size using the LZ4 algorithm.out - the output stream to compressblockSize - the BLOCKSIZE to usebits - a set of features to usejava.io.IOException - if an I/O error occursLZ4FrameOutputStream(OutputStream, BLOCKSIZE, long, FLG.Bits...)public LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
long knownSize,
LZ4FrameOutputStream.FLG.Bits... bits)
throws java.io.IOException
OutputStream that will compress data using using fastest instances of LZ4Compressor and XXHash32.out - the output stream to compressblockSize - the BLOCKSIZE to useknownSize - the size of the uncompressed data. A value less than zero means unknown.bits - a set of features to usejava.io.IOException - if an I/O error occurspublic LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize,
long knownSize,
LZ4Compressor compressor,
XXHash32 checksum,
LZ4FrameOutputStream.FLG.Bits... bits)
throws java.io.IOException
OutputStream that will compress data using the specified instances of LZ4Compressor and XXHash32.out - the output stream to compressblockSize - the BLOCKSIZE to useknownSize - the size of the uncompressed data. A value less than zero means unknown.compressor - the LZ4Compressor instance to use to compress datachecksum - the XXHash32 instance to use to check data for integritybits - a set of features to usejava.io.IOException - if an I/O error occurspublic LZ4FrameOutputStream(java.io.OutputStream out,
LZ4FrameOutputStream.BLOCKSIZE blockSize)
throws java.io.IOException
OutputStream that will compress data using the LZ4 algorithm. The block independence flag is set, and none of the other flags are set.out - The stream to compressblockSize - the BLOCKSIZE to usejava.io.IOException - if an I/O error occursLZ4FrameOutputStream(OutputStream, BLOCKSIZE, FLG.Bits...)public LZ4FrameOutputStream(java.io.OutputStream out)
throws java.io.IOException
OutputStream that will compress data using the LZ4 algorithm with 4-MB blocks.out - the output stream to compressjava.io.IOException - if an I/O error occursLZ4FrameOutputStream(OutputStream, BLOCKSIZE)public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOException