public final class KafkaLZ4BlockOutputStream extends FilterOutputStream
| 限定符和类型 | 类和说明 |
|---|---|
static class |
KafkaLZ4BlockOutputStream.BD |
static class |
KafkaLZ4BlockOutputStream.FLG |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BLOCKSIZE_1MB |
static int |
BLOCKSIZE_256KB |
static int |
BLOCKSIZE_4MB |
static int |
BLOCKSIZE_64KB |
static String |
CLOSED_STREAM |
static int |
LZ4_FRAME_INCOMPRESSIBLE_MASK |
static int |
LZ4_MAX_HEADER_LENGTH |
static int |
MAGIC |
out| 构造器和说明 |
|---|
KafkaLZ4BlockOutputStream(OutputStream out)
Create a new
OutputStream that will compress data using the LZ4 algorithm. |
KafkaLZ4BlockOutputStream(OutputStream out,
int blockSize)
Create a new
OutputStream that will compress data using the LZ4 algorithm. |
KafkaLZ4BlockOutputStream(OutputStream out,
int blockSize,
boolean blockChecksum)
Create a new
OutputStream that will compress data using the LZ4 algorithm. |
public static final int MAGIC
public static final int LZ4_MAX_HEADER_LENGTH
public static final int LZ4_FRAME_INCOMPRESSIBLE_MASK
public static final int BLOCKSIZE_64KB
public static final int BLOCKSIZE_256KB
public static final int BLOCKSIZE_1MB
public static final int BLOCKSIZE_4MB
public KafkaLZ4BlockOutputStream(OutputStream out, int blockSize, boolean blockChecksum) throws IOException
OutputStream that will compress data using the LZ4 algorithm.out - The output stream to compressblockSize - Default: 4. The block size used during compression. 4=64kb, 5=256kb, 6=1mb, 7=4mb. All other values will generate an exceptionblockChecksum - Default: false. When true, a XXHash32 checksum is computed and appended to the stream for every block of dataIOExceptionpublic KafkaLZ4BlockOutputStream(OutputStream out, int blockSize) throws IOException
OutputStream that will compress data using the LZ4 algorithm.out - The stream to compressblockSize - Default: 4. The block size used during compression. 4=64kb, 5=256kb, 6=1mb, 7=4mb. All other values will generate an exceptionIOExceptionpublic KafkaLZ4BlockOutputStream(OutputStream out) throws IOException
OutputStream that will compress data using the LZ4 algorithm.out - The output stream to compressIOExceptionpublic void write(int b)
throws IOException
write 在类中 FilterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write 在类中 FilterOutputStreamIOExceptionpublic void flush()
throws IOException
flush 在接口中 Flushableflush 在类中 FilterOutputStreamIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 FilterOutputStreamIOExceptionCopyright © 2020 Joyqueue Community. All rights reserved.