public class DelegatingBytes32 extends AbstractBytes implements Bytes32
This class may be used to create more types that represent 32 bytes, but need a different name for business logic.
| Modifier | Constructor and Description |
|---|---|
protected |
DelegatingBytes32(Bytes delegate) |
| Modifier and Type | Method and Description |
|---|---|
Bytes32 |
copy()
Return a value equivalent to this one but guaranteed to 1) be deeply immutable (i.e.
|
byte |
get(int i)
Retrieve a byte in this value.
|
MutableBytes32 |
mutableCopy()
Return a new mutable value initialized with the content of this value.
|
int |
size()
Provides the number of bytes this value represents.
|
Bytes |
slice(int index,
int length)
Create a new value representing (a view of) a slice of the bytes of this value.
|
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitand, fromHexString, fromHexStringLenient, fromHexStringStrict, leftPad, not, or, random, random, rightPad, shiftLeft, shiftRight, wrap, wrap, wrap, wrap, xorand, and, appendHexTo, appendTo, appendTo, bitLength, commonPrefix, commonPrefixLength, compareTo, concatenate, concatenate, copyTo, copyTo, fromBase64String, fromHexString, fromHexStringLenient, getInt, getInt, getLong, getLong, hasLeadingZero, hasLeadingZeroByte, isEmpty, isZero, minimalBytes, not, numberOfLeadingZeroBytes, numberOfLeadingZeros, numberOfTrailingZeroBytes, of, of, ofUnsignedInt, ofUnsignedInt, ofUnsignedLong, ofUnsignedLong, ofUnsignedShort, ofUnsignedShort, or, or, random, random, reverse, shiftLeft, shiftRight, slice, toArray, toArray, toArrayUnsafe, toBase64String, toBigInteger, toBigInteger, toEllipsisHexString, toHexString, toInt, toInt, toLong, toLong, toQuantityHexString, toShortHexString, toString, toUnprefixedHexString, toUnsignedBigInteger, toUnsignedBigInteger, trimLeadingZeros, update, wrap, wrap, wrapBuffer, wrapBuffer, wrapByteBuf, wrapByteBuf, wrapByteBuffer, wrapByteBuffer, xor, xorprotected DelegatingBytes32(Bytes delegate)
public int size()
Bytespublic byte get(int i)
Bytespublic Bytes slice(int index, int length)
Bytes
Please note that the resulting slice is only a view and as such maintains a link to the underlying full value. So
holding a reference to the returned slice may hold more memory than the slide represents. Use Bytes.copy() on the
returned slice if that is not what you want.
public Bytes32 copy()
Bytespublic MutableBytes32 mutableCopy()
BytesmutableCopy in interface BytesmutableCopy in interface Bytes32