public final class PlpLength extends Object
Length to encode/decode length headers of a PLP chunk and PlpLength to
encode/decode the the total PLP stream lengthLength| Modifier and Type | Field and Description |
|---|---|
static long |
PLP_NULL |
static long |
UNKNOWN_PLP_LEN |
| 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 PlpLength. |
static PlpLength |
decode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
Decode a
PlpLength for a TypeInformation. |
void |
encode(io.netty.buffer.ByteBuf buffer)
Encode length or PLP_NULL.
|
long |
getLength() |
boolean |
isNull() |
boolean |
isUnknown() |
static PlpLength |
nullLength()
Creates a
PlpLength that indicates the value is null. |
static PlpLength |
of(long length)
Creates a
PlpLength with a given length. |
static PlpLength |
of(long length,
boolean isNull)
Creates a
PlpLength. |
String |
toString() |
static PlpLength |
unknown()
Creates a
PlpLength that indicates the value length is unknown. |
public static final long PLP_NULL
public static final long UNKNOWN_PLP_LEN
public static PlpLength unknown()
PlpLength that indicates the value length is unknown.PlpLength with unknown length.public static PlpLength nullLength()
PlpLength that indicates the value is null.PlpLength for null.public static PlpLength of(long length)
PlpLength with a given length.length - value length.PlpLength for a non-null value of the given length.public static PlpLength of(long length, boolean isNull)
PlpLength.length - value length.isNull - true if the value is null.PlpLength.public static PlpLength decode(io.netty.buffer.ByteBuf buffer, TypeInformation type)
PlpLength for a TypeInformation.buffer - the data buffer.type - TypeInformation.PlpLength.public static boolean canDecode(io.netty.buffer.ByteBuf buffer,
TypeInformation type)
ByteBuf can be decoded into an PlpLength.buffer - the data buffer.type - TypeInformation.true if the buffer contains sufficient data to decode a PlpLength.public void encode(io.netty.buffer.ByteBuf buffer)
buffer - the data buffer.public long getLength()
public boolean isNull()
public boolean isUnknown()
Copyright © 2023. All rights reserved.