public static interface CompressionFactory.LongEncodingWriter
setBuffer(ByteBuffer)
or
setOutputStream(OutputStream)
must be called before any value is written, and flush()
must
be called before calling setBuffer or setOutputStream again to set another output.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) |
void setBuffer(ByteBuffer buffer)
void setOutputStream(OutputStream output)
void write(long value) throws IOException
IOException
void flush() throws IOException
IOException
void putMeta(OutputStream metaOut, CompressedObjectStrategy.CompressionStrategy strategy) throws IOException
IOException
int getBlockSize(int bytesPerBlock)
int getNumBytes(int values)
Copyright © 2011–2017. All rights reserved.