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.
| 限定符 | 构造器和说明 |
|---|---|
protected |
DelegatingBytes32(Bytes delegate) |
| 限定符和类型 | 方法和说明 |
|---|---|
Bytes32 |
copy()
Return a value equivalent to this one but guaranteed to 1) be deeply immutable
(i.e. the underlying value will be immutable) and 2) to not retain more bytes than
exposed by the value.
|
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, toStringand, 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 在接口中 BytesmutableCopy 在接口中 Bytes32Copyright © 2021. All rights reserved.