@InterfaceAudience.Public public class RawBytesTerminated extends TerminatedWrapper<byte[]>
DataType
that encodes variable-length values encoded using
Bytes.putBytes(byte[], int, byte[], int, int)
.
Includes a termination marker following the raw byte[]
value. Intended to make it easier
to transition away from direct use of Bytes
.term, wrapped
Constructor and Description |
---|
RawBytesTerminated(byte[] term)
Create a
RawBytesTerminated using the specified terminator. |
RawBytesTerminated(Order order,
byte[] term)
Create a
RawBytesTerminated using the specified terminator and
order . |
RawBytesTerminated(Order order,
String term)
Create a
RawBytesTerminated using the specified terminator and
order . |
RawBytesTerminated(String term)
Create a
RawBytesTerminated using the specified terminator. |
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(PositionedByteRange src,
int length)
Read a
byte[] from the buffer src . |
int |
encode(PositionedByteRange dst,
byte[] val,
int voff,
int vlen)
Write
val into dst , respecting offset and
length . |
decode, encode, encodedClass, encodedLength, getOrder, isNullable, isOrderPreserving, isSkippable, skip, terminatorPosition
public RawBytesTerminated(Order order, byte[] term)
RawBytesTerminated
using the specified terminator and
order
.IllegalArgumentException
- if term
is null
or empty.public RawBytesTerminated(Order order, String term)
RawBytesTerminated
using the specified terminator and
order
.IllegalArgumentException
- if term
is null
or empty.public RawBytesTerminated(byte[] term)
RawBytesTerminated
using the specified terminator.IllegalArgumentException
- if term
is null
or empty.public RawBytesTerminated(String term)
RawBytesTerminated
using the specified terminator.IllegalArgumentException
- if term
is null
or empty.public byte[] decode(PositionedByteRange src, int length)
byte[]
from the buffer src
.public int encode(PositionedByteRange dst, byte[] val, int voff, int vlen)
val
into dst
, respecting offset
and
length
.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.