| Modifier and Type | Field and Description |
|---|---|
static int |
UNKNOWN_STREAM_LENGTH |
static int |
USHORT_NULL |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canDecode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
Check whether the
ByteBuf can be decoded into an Length. |
static Length |
decode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
Decode a
Length for a TypeInformation. |
void |
encode(io.netty.buffer.ByteBuf buffer,
LengthStrategy lengthStrategy) |
void |
encode(io.netty.buffer.ByteBuf buffer,
TypeInformation type) |
int |
getLength() |
boolean |
isNull() |
static Length |
nullLength()
Creates a
Length that indicates the value is null. |
static Length |
of(int length)
Creates a
Length with a given length. |
static Length |
of(int length,
boolean isNull)
Creates a
Length. |
String |
toString() |
public static final int USHORT_NULL
public static final int UNKNOWN_STREAM_LENGTH
public static Length nullLength()
Length that indicates the value is null.Length for null.public static Length of(int length)
Length with a given length.length - value length.Length for a non-null value of the given length.public static Length of(int length, boolean isNull)
Length.length - value length.isNull - true if the value is null.Length.public static Length decode(io.netty.buffer.ByteBuf buffer, TypeInformation type)
Length for a TypeInformation.buffer - the data buffer.type - TypeInformation.Length.public static boolean canDecode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
ByteBuf can be decoded into an Length.buffer - the data buffer.type - TypeInformation.true if the buffer contains sufficient data to decode a Length.public void encode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
public void encode(io.netty.buffer.ByteBuf buffer,
LengthStrategy lengthStrategy)
public int getLength()
public boolean isNull()
Copyright © 2023. All rights reserved.