public class TableLongEncodingWriter extends Object implements CompressionFactory.LongEncodingWriter
Constructor and Description |
---|
TableLongEncodingWriter(com.google.common.collect.BiMap<Long,Integer> table) |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush the unwritten content to the current output.
|
int |
getBlockSize(int bytesPerBlock)
Get the number of values that can be encoded into each block for the given block size in bytes
|
int |
getNumBytes(int values)
Get the number of bytes required to encoding the given number of values
|
void |
putMeta(OutputStream metaOut,
CompressedObjectStrategy.CompressionStrategy strategy)
Output the header values of the associating encoding format to the given outputStream.
|
void |
setBuffer(ByteBuffer buffer)
Data will be written starting from current position of the buffer, and the position of the buffer will be
updated as content is written.
|
void |
setOutputStream(OutputStream output) |
void |
write(long value) |
public void setBuffer(ByteBuffer buffer)
CompressionFactory.LongEncodingWriter
setBuffer
in interface CompressionFactory.LongEncodingWriter
public void setOutputStream(OutputStream output)
setOutputStream
in interface CompressionFactory.LongEncodingWriter
public void write(long value) throws IOException
write
in interface CompressionFactory.LongEncodingWriter
IOException
public void flush() throws IOException
CompressionFactory.LongEncodingWriter
flush
in interface CompressionFactory.LongEncodingWriter
IOException
public void putMeta(OutputStream metaOut, CompressedObjectStrategy.CompressionStrategy strategy) throws IOException
CompressionFactory.LongEncodingWriter
putMeta
in interface CompressionFactory.LongEncodingWriter
IOException
public int getBlockSize(int bytesPerBlock)
CompressionFactory.LongEncodingWriter
getBlockSize
in interface CompressionFactory.LongEncodingWriter
public int getNumBytes(int values)
CompressionFactory.LongEncodingWriter
getNumBytes
in interface CompressionFactory.LongEncodingWriter
Copyright © 2011–2017. All rights reserved.