|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.builtintypes.ByteString
public final class ByteString
This primitive DataType specifies a ByteString, similar as String but for bytes. Class is final because it is an immutable value object. Also the constructor is private to avoid situations where the given value would be null, now the static factory methods returns null if given ByteString Null equivalent byte[].
| Field Summary | |
|---|---|
static ByteString |
EMPTY
ByteString instance that models empty ByteString. |
| Method Summary | |
|---|---|
static byte[] |
asByteArray(ByteString byteString)
A null-safe way to convert ByteString to byte[]. |
int |
compareTo(ByteString o)
|
boolean |
equals(Object obj)
|
int |
getLength()
Return the length of this ByteString. |
byte[] |
getValue()
Get a copy of the value of this ByteString as byte array. |
int |
hashCode()
|
String |
toString()
|
static ByteString |
valueOf(byte... byteArray)
Creates a ByteString from byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ByteString EMPTY
| Method Detail |
|---|
public static byte[] asByteArray(ByteString byteString)
byteString - a ByteString or null
public static ByteString valueOf(byte... byteArray)
byteArray - the byte array
public boolean equals(Object obj)
equals in class Objectpublic byte[] getValue()
public int getLength()
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int compareTo(ByteString o)
compareTo in interface Comparable<ByteString>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||