Package org.bitcoinj.base.internal
Class ByteArray
java.lang.Object
org.bitcoinj.base.internal.ByteArray
- All Implemented Interfaces:
Comparable<ByteArray>
- Direct Known Subclasses:
AesKey
,Bech32.Bech32Bytes
An effectively-immutable byte array.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
bytes
protected final byte[] bytes
-
-
Constructor Details
-
ByteArray
public ByteArray(byte[] bytes) Wrapper for abyte[]
- Parameters:
bytes
- byte data to wrap
-
-
Method Details
-
bytes
public byte[] bytes()- Returns:
- the key bytes
-
formatHex
- Returns:
- the bytes as a hex-formatted string
-
hashCode
public int hashCode() -
equals
-
compareTo
For
ByteArray
this is a byte-by-byte, unsigned comparison.- Specified by:
compareTo
in interfaceComparable<ByteArray>
- Parameters:
o
-- Returns:
-