@Immutable public class BinaryKey extends Object implements Serializable, Comparable<BinaryKey>
Constructor and Description |
---|
BinaryKey(byte[] hash) |
BinaryKey(String key) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BinaryKey other) |
boolean |
equals(Object obj) |
int |
hashCode() |
static boolean |
isProperlyFormattedKey(String hexadecimalStr)
Determine if the supplied hexadecimal string is potentially a binary key by checking the format of the string.
|
static BinaryKey |
keyFor(byte[] content) |
static int |
maxHexadecimalLength() |
static int |
minHexadecimalLength() |
byte[] |
toBytes()
Get this binary key in the form of a byte array.
|
String |
toString() |
public BinaryKey(String key)
public BinaryKey(byte[] hash)
public static int maxHexadecimalLength()
public static int minHexadecimalLength()
public static boolean isProperlyFormattedKey(String hexadecimalStr)
hexadecimalStr
- the hexadecimal string; may be nullpublic static BinaryKey keyFor(byte[] content)
public byte[] toBytes()
public int compareTo(BinaryKey other)
compareTo
in interface Comparable<BinaryKey>
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.