public class Bytes extends Object implements Comparable<Bytes>
| Constructor and Description |
|---|
Bytes(byte[] bytes)
Create a Bytes using the byte array.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Bytes that) |
boolean |
equals(Object other) |
byte[] |
get()
Get the data from the Bytes.
|
int |
hashCode()
The hashcode is cached except for the case where it is computed as 0, in which
case we compute the hashcode on every call.
|
String |
toString() |
static Bytes |
wrap(byte[] bytes) |
public Bytes(byte[] bytes)
bytes - This array becomes the backing storage for the object.public static Bytes wrap(byte[] bytes)
public byte[] get()
public int hashCode()
public int compareTo(Bytes that)
compareTo in interface Comparable<Bytes>Copyright © 2024. All rights reserved.