public class Bytes extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
EMPTY
Empty byte array.
|
| Constructor and Description |
|---|
Bytes(byte[] bytes)
Create bytes array.
|
Bytes(byte[] bytes,
int maxLength,
boolean copy)
Create bytes array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAsString()
Get bytes as (hexadecimal) string.
|
byte[] |
getBytes()
Get bytes array.
|
int |
hashCode() |
boolean |
isEmpty()
Check, if connection id is empty.
|
int |
length()
Return number of bytes.
|
String |
toString() |
public Bytes(byte[] bytes)
bytes - bytes (not copied!)NullPointerException - if bytes is nullIllegalArgumentException - if bytes length is larger than 255public Bytes(byte[] bytes,
int maxLength,
boolean copy)
bytes - bytesmaxLength - maximum length of bytescopy - true to copy bytes, false to use the provided bytesNullPointerException - if bytes is nullIllegalArgumentException - if bytes length is larger than maxLengthpublic final byte[] getBytes()
public final String getAsString()
public final boolean isEmpty()
true, if connection id is empty, false, otherwisepublic final int length()
Copyright © 2019 Eclipse Foundation. All rights reserved.