- java.lang.Object
-
- com.github.f4b6a3.uuid.util.immutable.ByteArray
-
public final class ByteArray extends Object
Immutable array of bytes.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]array()Returns copy of the array.booleanequals(Object obj)static ByteArrayfrom(byte[] a)Creates an instance of this class.byteget(int index)Return the byte at a position.inthashCode()intlength()Returns the array lengthStringtoString()
-
-
-
Method Detail
-
from
public static ByteArray from(byte[] a)
Creates an instance of this class.- Parameters:
a- an array of bytes- Returns:
- a new instance
-
get
public byte get(int index)
Return the byte at a position.- Parameters:
index- the position- Returns:
- a byte
-
length
public int length()
Returns the array length- Returns:
- the length
-
array
public byte[] array()
Returns copy of the array.- Returns:
- an array of bytes
-
-