| Modifier and Type | Field and Description |
|---|---|
static int |
BITOFBYTE
The Constant BIT OF A BYTE.
|
protected byte |
typ
The Byte Typ.
|
static java.lang.String |
TYP |
static int |
TYPBYTE |
static java.lang.String |
VALUE |
protected byte[] |
values
The values.
|
| Constructor and Description |
|---|
ByteEntity() |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteToUnsignedByte(int n)
Byte to unsigned byte.
|
int |
calcLength(boolean isDynamic,
boolean isLast)
calculate the length of value
|
static ByteEntity |
create(java.lang.Object value) |
ByteBuffer |
getBytes(boolean isDynamic) |
BaseItem |
getNewList(boolean keyValue) |
byte |
getTyp()
Gets the typ.
|
byte[] |
getValue()
Gets the value.
|
java.lang.Object |
getValue(java.lang.Object key) |
boolean |
isEmpty() |
boolean |
setValues(java.lang.Object value) |
int |
size()
Size of Item
|
java.lang.String |
toString()
Convert Element to String
|
java.lang.String |
toString(ByteConverter converter,
boolean dynamic)
Convert the bytes to a String
|
java.lang.String |
toString(Converter converter)
Convert the bytes to a String
|
ByteEntity |
with(java.lang.Object... values)
Add Elements to List or KeyValue
if param Modulo 2 the Params can be Key,Value
or add all Values to List
|
ByteEntity |
withValue(byte[] values) |
ByteEntity |
withValue(byte type,
byte value)
Sets the value.
|
ByteEntity |
withValue(byte type,
byte[] value)
Sets the value.
|
ByteEntity |
withValue(byte typ,
int value) |
void |
writeBytes(ByteBuffer buffer,
boolean isDynamic,
boolean isLast,
boolean isPrimitive)
Gets the bytes.
|
public static final int BITOFBYTE
public static final int TYPBYTE
public static final java.lang.String TYP
public static final java.lang.String VALUE
protected byte typ
protected byte[] values
public byte[] getValue()
public ByteEntity withValue(byte type, byte[] value)
type - the new typevalue - the new valuepublic ByteEntity withValue(byte type, byte value)
type - the type of Elementvalue - the new valuepublic ByteEntity withValue(byte typ, int value)
public byte byteToUnsignedByte(int n)
n - the Bytepublic java.lang.String toString()
BaseItempublic java.lang.String toString(Converter converter)
public java.lang.String toString(ByteConverter converter, boolean dynamic)
public void writeBytes(ByteBuffer buffer, boolean isDynamic, boolean isLast, boolean isPrimitive)
writeBytes in interface ByteItembuffer - The Buffer to writeisDynamic - is short the Stream for messageisLast - is the Element is the last of GroupisPrimitive - is the Element is the StreamClazzpublic ByteBuffer getBytes(boolean isDynamic)
public boolean setValues(java.lang.Object value)
public byte getTyp()
public int calcLength(boolean isDynamic,
boolean isLast)
calcLength in interface ByteItemisDynamic - ByteStream for minimize outputisLast - is the Element is the Last of Grouppublic BaseItem getNewList(boolean keyValue)
getNewList in interface BaseItempublic boolean isEmpty()
public int size()
ByteItempublic static ByteEntity create(java.lang.Object value)
public ByteEntity with(java.lang.Object... values)
BaseItempublic ByteEntity withValue(byte[] values)
public java.lang.Object getValue(java.lang.Object key)