public class LzopOutputStream
extends org.apache.hadoop.io.compress.CompressorStream
| Modifier and Type | Field and Description |
|---|---|
protected DataOutputStream |
indexOut |
| Constructor and Description |
|---|
LzopOutputStream(OutputStream out,
org.apache.hadoop.io.compress.Compressor compressor,
int bufferSize,
LzoCompressor.CompressionStrategy strategy) |
LzopOutputStream(OutputStream out,
DataOutputStream indexOut,
org.apache.hadoop.io.compress.Compressor compressor,
int bufferSize,
LzoCompressor.CompressionStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying stream and write a null word to the output stream.
|
protected void |
compress() |
void |
finish() |
void |
write(byte[] b,
int off,
int len) |
protected static void |
writeLzopHeader(OutputStream out,
LzoCompressor.CompressionStrategy strategy,
int compressionLevel)
Write an lzop-compatible header to the OutputStream provided.
|
writeprotected DataOutputStream indexOut
public LzopOutputStream(OutputStream out, org.apache.hadoop.io.compress.Compressor compressor, int bufferSize, LzoCompressor.CompressionStrategy strategy) throws IOException
IOExceptionpublic LzopOutputStream(OutputStream out, DataOutputStream indexOut, org.apache.hadoop.io.compress.Compressor compressor, int bufferSize, LzoCompressor.CompressionStrategy strategy) throws IOException
IOExceptionprotected static void writeLzopHeader(OutputStream out, LzoCompressor.CompressionStrategy strategy, int compressionLevel) throws IOException
out - OutputStreamstrategy - The lzo compression algorithmcompressionLevel - the lzo compression levelIOException - if lzop strategy is incompatiblepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.io.compress.CompressorStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class org.apache.hadoop.io.compress.CompressorStreamIOExceptionpublic void finish()
throws IOException
finish in class org.apache.hadoop.io.compress.CompressorStreamIOExceptionprotected void compress()
throws IOException
compress in class org.apache.hadoop.io.compress.CompressorStreamIOExceptionCopyright © 2016. All Rights Reserved.