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()intcompareTo(ByteArray o)booleanequals(java.lang.Object o)java.lang.StringformatHex()inthashCode()
-
-
-
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:
hashCodein classjava.lang.Object- Returns:
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object- Parameters:
o-- Returns:
-
-