@InterfaceAudience.Public public class OrderedBlob extends OrderedBytesBase<byte[]>
byte[]
of variable-length. Build on
OrderedBytes.encodeBlobCopy(PositionedByteRange, byte[], int, int, Order)
.Modifier and Type | Field and Description |
---|---|
static OrderedBlob |
ASCENDING
Deprecated.
since 3.0.0 and will be removed in 4.0.0
|
static OrderedBlob |
DESCENDING
Deprecated.
since 3.0.0 and will b removed in 4.0.0
|
order
Constructor and Description |
---|
OrderedBlob(Order order)
Creates a new
byte[] with variable length. |
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(PositionedByteRange src)
Read an instance of
T from the buffer src . |
int |
encode(PositionedByteRange dst,
byte[] val)
Write instance
val into buffer dst . |
int |
encode(PositionedByteRange dst,
byte[] val,
int voff,
int vlen)
Write a subset of
val to dst . |
Class<byte[]> |
encodedClass()
Inform consumers over what type this
DataType operates. |
int |
encodedLength(byte[] val)
Inform consumers how long the encoded
byte[] will be. |
boolean |
isSkippable()
Indicates whether this instance is able to skip over it's encoded value.
|
getOrder, isNullable, isOrderPreserving, skip
@Deprecated public static final OrderedBlob ASCENDING
@Deprecated public static final OrderedBlob DESCENDING
public OrderedBlob(Order order)
byte[]
with variable length.order
- the Order
to usepublic boolean isSkippable()
DataType
DataType
s that
are not skippable can only be used as the right-most field of a Struct
.isSkippable
in interface DataType<byte[]>
isSkippable
in class OrderedBytesBase<byte[]>
public int encodedLength(byte[] val)
DataType
byte[]
will be.val
- The value to check.val
.apublic Class<byte[]> encodedClass()
DataType
DataType
operates. Useful when working with bare
DataType
instances.public byte[] decode(PositionedByteRange src)
DataType
T
from the buffer src
.src
- the buffer containing the encoded value.public int encode(PositionedByteRange dst, byte[] val)
DataType
val
into buffer dst
.dst
- the buffer containing the encoded value.val
- the value to encode onto dst
.public int encode(PositionedByteRange dst, byte[] val, int voff, int vlen)
val
to dst
.dst
- the PositionedByteRange
to write toval
- the value to write to dst
voff
- the offset in dst
where to write val
tovlen
- the lenght of val
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.