public final class ByteKey extends java.lang.Object implements java.lang.Comparable<ByteKey>, java.io.Serializable
byte[] keys
 are typical in key-value stores such as Google Cloud Bigtable.
 Instances of ByteKey are immutable.
 
ByteKey implements Comparable<ByteKey> by comparing the
 arrays in lexicographic order. The smallest ByteKey is a zero-length array; the successor
 to a key is the same key with an additional 0 byte appended; and keys have unbounded size.
 
Note that the empty ByteKey compares smaller than all other keys, but some systems
 have the semantic that when an empty ByteKey is used as an upper bound, it represents the
 largest possible key. In these cases, implementors should use isEmpty() to test whether an
 upper bound key is empty.
| Modifier and Type | Method and Description | 
|---|---|
| int | compareTo(ByteKey other)ByteKeyimplementsComparable<ByteKey>by comparing the arrays
 in lexicographic order. | 
| static ByteKey | copyFrom(byte[] bytes)Creates a new  ByteKeybacked by a copy of the specifiedbyte[]. | 
| static ByteKey | copyFrom(java.nio.ByteBuffer value)Creates a new  ByteKeybacked by a copy of the data remaining in the specifiedByteBuffer. | 
| boolean | equals(@Nullable java.lang.Object o) | 
| byte[] | getBytes()Returns a newly-allocated  byte[]representing thisByteKey. | 
| java.nio.ByteBuffer | getValue()Returns a read-only  ByteBufferrepresenting thisByteKey. | 
| int | hashCode() | 
| boolean | isEmpty() | 
| static ByteKey | of(int... bytes)Creates a new  ByteKeybacked by a copy of the specifiedint[]. | 
| java.lang.String | toString() | 
public static final ByteKey EMPTY
public static ByteKey copyFrom(java.nio.ByteBuffer value)
ByteKey backed by a copy of the data remaining in the specified ByteBuffer.public static ByteKey copyFrom(byte[] bytes)
ByteKey backed by a copy of the specified byte[].
 Makes a copy of the underlying array.
public static ByteKey of(int... bytes)
public java.nio.ByteBuffer getValue()
ByteBuffer representing this ByteKey.public byte[] getBytes()
public boolean isEmpty()
public int compareTo(@Nonnull ByteKey other)
ByteKey implements Comparable<ByteKey> by comparing the arrays
 in lexicographic order. The smallest ByteKey is a zero-length array; the successor to a
 key is the same key with an additional 0 byte appended; and keys have unbounded size.compareTo in interface java.lang.Comparable<ByteKey>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(@Nullable java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object