@InterfaceAudience.Private public class TagCompressionContext extends Object
| Modifier and Type | Field and Description |
|---|---|
private Dictionary |
tagDict |
| Constructor and Description |
|---|
TagCompressionContext(Class<? extends Dictionary> dictType,
int dictCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
compressTags(OutputStream out,
byte[] in,
int offset,
int length)
Compress tags one by one and writes to the OutputStream.
|
void |
compressTags(OutputStream out,
ByteBuffer in,
int offset,
int length)
Compress tags one by one and writes to the OutputStream.
|
int |
uncompressTags(ByteBuff src,
byte[] dest,
int offset,
int length)
Uncompress tags from the input ByteBuffer and writes to the destination array.
|
void |
uncompressTags(InputStream src,
byte[] dest,
int offset,
int length)
Uncompress tags from the InputStream and writes to the destination array.
|
void |
uncompressTags(InputStream src,
ByteBuffer dest,
int length)
Uncompress tags from the InputStream and writes to the destination buffer.
|
private final Dictionary tagDict
public TagCompressionContext(Class<? extends Dictionary> dictType, int dictCapacity) throws SecurityException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
public void clear()
public void compressTags(OutputStream out, byte[] in, int offset, int length) throws IOException
out - Stream to which the compressed tags to be writtenin - Source where tags are availableoffset - Offset for the tags byteslength - Length of all tag bytes nIOExceptionpublic void compressTags(OutputStream out, ByteBuffer in, int offset, int length) throws IOException
out - Stream to which the compressed tags to be writtenin - Source buffer where tags are availableoffset - Offset for the tags byte bufferlength - Length of all tag bytes nIOExceptionpublic void uncompressTags(InputStream src, byte[] dest, int offset, int length) throws IOException
src - Stream where the compressed tags are availabledest - Destination array where to write the uncompressed tagsoffset - Offset in destination where tags to be writtenlength - Length of all tag bytes nIOExceptionpublic int uncompressTags(ByteBuff src, byte[] dest, int offset, int length) throws IOException
src - Buffer where the compressed tags are availabledest - Destination array where to write the uncompressed tagsoffset - Offset in destination where tags to be writtenlength - Length of all tag bytesIOExceptionpublic void uncompressTags(InputStream src, ByteBuffer dest, int length) throws IOException
src - Stream where the compressed tags are availabledest - Destination buffer where to write the uncompressed tagslength - Length of all tag bytesIOException - when the dictionary does not have the entryCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.