| Modifier and Type | Field | Description |
|---|---|---|
static int |
BITOFBYTE |
The Constant BIT OF A BYTE.
|
protected byte |
type |
The Byte Type.
|
static java.lang.String |
TYPE |
|
static int |
TYPEBYTE |
|
static java.lang.String |
VALUE |
|
protected byte[] |
values |
The values.
|
| Constructor | Description |
|---|---|
ByteEntity() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(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
|
byte |
byteToUnsignedByte(int n) |
Byte to unsigned byte.
|
int |
calcLength(boolean isDynamic,
boolean isLast) |
calculate the length of value
|
static ByteEntity |
create(int type,
java.lang.Object value) |
|
static ByteEntity |
create(java.lang.Object value) |
|
ByteBuffer |
getBytes(boolean isDynamic) |
|
BaseItem |
getNewList(boolean keyValue) |
|
byte |
getType() |
Gets the type.
|
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 |
toBinaryString() |
|
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 |
withType(byte type) |
|
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 type,
int value) |
|
void |
writeBytes(ByteBuffer buffer,
boolean isDynamic,
boolean isLast,
boolean isPrimitive) |
Gets the bytes.
|
public static final int BITOFBYTE
public static final int TYPEBYTE
public static final java.lang.String TYPE
public static final java.lang.String VALUE
protected byte type
protected byte[] values
public java.lang.String toBinaryString()
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 withType(byte type)
public ByteEntity withValue(byte type, 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 getType()
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 static ByteEntity create(int type, java.lang.Object value)
public boolean add(java.lang.Object... values)
BaseItempublic ByteEntity withValue(byte[] values)
public java.lang.Object getValue(java.lang.Object key)