Package org.bitcoinj.base.internal
Class ByteArray
- java.lang.Object
-
- org.bitcoinj.base.internal.ByteArray
-
- All Implemented Interfaces:
java.lang.Comparable<ByteArray>
- Direct Known Subclasses:
AesKey
,Bech32.Bech32Bytes
public class ByteArray extends java.lang.Object implements java.lang.Comparable<ByteArray>
An effectively-immutable byte array.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
bytes
-
Constructor Summary
Constructors Constructor Description ByteArray(byte[] bytes)
Wrapper for abyte[]
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
bytes()
int
compareTo(ByteArray o)
boolean
equals(java.lang.Object o)
java.lang.String
formatHex()
int
hashCode()
-
-
-
Method Detail
-
bytes
public byte[] bytes()
- Returns:
- the key bytes
-
formatHex
public java.lang.String formatHex()
- Returns:
- the bytes as a hex-formatted string
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
-- Returns:
-
-