public class DictionaryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equalsInternal(byte[] bytes,
int offset,
int length,
int position,
DynamicIntArray keyOffsets,
DynamicByteArray byteArray)
Compare a UTF8 string from the byteArray using the offset in index-array.
|
static ByteBuffer |
getTextInternal(int position,
DynamicIntArray keyOffsets,
DynamicByteArray byteArray)
Return a
ByteBuffer containing the data at a certain offset within a
DynamicByteArray. |
static void |
getTextInternal(Text result,
int position,
DynamicIntArray keyOffsets,
DynamicByteArray byteArray)
Obtain the UTF8 string from the byteArray using the offset in index-array.
|
static int |
writeToTextInternal(OutputStream out,
int position,
DynamicIntArray keyOffsets,
DynamicByteArray byteArray)
Write a UTF8 string from the byteArray, using the offset in index-array,
into an OutputStream
|
public static void getTextInternal(Text result, int position, DynamicIntArray keyOffsets, DynamicByteArray byteArray)
result - Container for the UTF8 String.position - position in the keyOffsetskeyOffsets - starting offset of the key (in byte) in the byte array.byteArray - storing raw bytes of all keys seen in dictionarypublic static ByteBuffer getTextInternal(int position, DynamicIntArray keyOffsets, DynamicByteArray byteArray)
ByteBuffer containing the data at a certain offset within a
DynamicByteArray.position - position in the keyOffsetskeyOffsets - starting offset of the key (in byte) in the byte arraybyteArray - storing raw bytes of all keys seen in dictionarypublic static int writeToTextInternal(OutputStream out, int position, DynamicIntArray keyOffsets, DynamicByteArray byteArray) throws IOException
out - the output streamposition - position in the keyOffsetskeyOffsets - starting offset of the key (in byte) in the byte arraybyteArray - storing raw bytes of all keys seen in dictionaryIOException - if an I/O error occurspublic static boolean equalsInternal(byte[] bytes,
int offset,
int length,
int position,
DynamicIntArray keyOffsets,
DynamicByteArray byteArray)
bytes - an array containing bytes to search foroffset - the offset in the arraylength - the number of bytes to search forposition - position in the keyOffsetskeyOffsets - starting offset of the key (in byte) in the byte arraybyteArray - storing raw bytes of all key seen in dictionaryCopyright © 2013–2023 The Apache Software Foundation. All rights reserved.