Class EncodedStringDecoder<STRING_LIKE_TYPE extends CharSequence>
java.lang.Object
io.deephaven.engine.table.impl.sources.regioned.decoder.EncodedStringDecoder<STRING_LIKE_TYPE>
- All Implemented Interfaces:
ObjectDecoder<STRING_LIKE_TYPE>
public class EncodedStringDecoder<STRING_LIKE_TYPE extends CharSequence>
extends Object
implements ObjectDecoder<STRING_LIKE_TYPE>
-
Field Summary
Fields inherited from interface io.deephaven.util.codec.ObjectDecoder
VARIABLE_WIDTH_SENTINEL
-
Constructor Summary
ConstructorDescriptionEncodedStringDecoder
(StringCache<STRING_LIKE_TYPE> cache, EncodingInfo encodingInfo) EncodedStringDecoder
(Class<STRING_LIKE_TYPE> dataType, EncodingInfo encodingInfo) -
Method Summary
Modifier and TypeMethodDescriptionfinal STRING_LIKE_TYPE
decode
(@org.jetbrains.annotations.NotNull byte[] data, int offset, int length) Decode an object from an array of bytes.final int
What width byte array does this ObjectCodec expect to encode and decode?Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.util.codec.ObjectDecoder
checkWidth, decode
-
Constructor Details
-
EncodedStringDecoder
-
EncodedStringDecoder
-
-
Method Details
-
expectedObjectWidth
public final int expectedObjectWidth()Description copied from interface:ObjectDecoder
What width byte array does this ObjectCodec expect to encode and decode?- Specified by:
expectedObjectWidth
in interfaceObjectDecoder<STRING_LIKE_TYPE extends CharSequence>
- Returns:
- VARIABLE_WIDTH_SENTINEL if the codec must encode and decode variable width columns, otherwise the fixed size of byte array that must be decoded and encoded.
-
decode
public final STRING_LIKE_TYPE decode(@NotNull @org.jetbrains.annotations.NotNull byte[] data, int offset, int length) Description copied from interface:ObjectDecoder
Decode an object from an array of bytes.- Specified by:
decode
in interfaceObjectDecoder<STRING_LIKE_TYPE extends CharSequence>
- Parameters:
data
- The input byte array containing bytes to decodeoffset
- The offset into the byte array to start decoding fromlength
- The number of bytes to decode, starting at the offset- Returns:
- The output object, possibly null
-