public abstract class PrefixedChecksummedBytes extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<PrefixedChecksummedBytes>
The following format is often used to represent some type of data (e.g. key or hash of key):
[prefix] [data bytes] [checksum]
and the result is then encoded with some variant of base. This format is most commonly used for addresses and private keys exported using Bitcoin Core's dumpprivkey command.
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
bytes |
protected org.bitcoinj.core.NetworkParameters |
params |
| Modifier | Constructor and Description |
|---|---|
protected |
PrefixedChecksummedBytes(org.bitcoinj.core.NetworkParameters params,
byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
PrefixedChecksummedBytes |
clone()
This implementation narrows the return type to
PrefixedChecksummedBytes and allows subclasses to throw
CloneNotSupportedException even though it is never thrown by this
implementation. |
int |
compareTo(PrefixedChecksummedBytes o)
This implementation uses an optimized Google Guava method to compare
bytes. |
boolean |
equals(java.lang.Object o) |
org.bitcoinj.core.NetworkParameters |
getParameters() |
int |
hashCode() |
protected final transient org.bitcoinj.core.NetworkParameters params
protected final byte[] bytes
protected PrefixedChecksummedBytes(org.bitcoinj.core.NetworkParameters params,
byte[] bytes)
public final org.bitcoinj.core.NetworkParameters getParameters()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic PrefixedChecksummedBytes clone() throws java.lang.CloneNotSupportedException
PrefixedChecksummedBytes and allows subclasses to throw
CloneNotSupportedException even though it is never thrown by this
implementation.clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic int compareTo(PrefixedChecksummedBytes o)
bytes.compareTo in interface java.lang.Comparable<PrefixedChecksummedBytes>