| Modifier and Type | Class and Description |
|---|---|
class |
MutableBytes
|
class |
ReadOnlyBytes
The read-only version of
Bytes created by calling readOnly(). |
| Modifier and Type | Method and Description |
|---|---|
static Bytes |
Bytes.allocate(int length)
Creates a new instance with an empty array filled with zeros.
|
static Bytes |
Bytes.allocate(int length,
byte defaultValue)
Creates a new instance with an empty array filled with given defaultValue
|
Bytes |
Bytes.and(byte[] secondArray)
Bitwise AND operation on the whole internal byte array.
|
Bytes |
Bytes.and(Bytes bytes)
Bitwise AND operation on the whole internal byte array.
|
Bytes |
Bytes.append(byte singleByte)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(byte[]... arrays)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(byte[] secondArray)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(Bytes bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(char char2Bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(CharSequence stringUtf8)
Creates a new instance with the current array appended to the provided utf-8 encoded representation of this string
|
Bytes |
Bytes.append(CharSequence string,
Charset charset)
Creates a new instance with the current array appended to the provided string with provided encoding
|
Bytes |
Bytes.append(int integer4Bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(long long8Bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.append(short short2Bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.appendNullSafe(byte[] secondArrayNullable)
Creates a new instance with the current array appended to the provided data (ie.
|
Bytes |
Bytes.byteOrder(ByteOrder byteOrder)
Set the byte order or endianness of this instance.
|
Bytes |
Bytes.copy()
Creates a new instance with a copy of the internal byte array and all other attributes.
|
Bytes |
Bytes.copy(int offset,
int length)
Creates a new instance with a copy of the internal byte array and all other attributes.
|
Bytes |
Bytes.duplicate()
Create a new instance which shares the same underlying array
|
static Bytes |
Bytes.empty()
Creates an Byte instance with an internal empty byte array.
|
static Bytes |
Bytes.from(BigInteger bigInteger)
Creates a new instance from given
BigInteger. |
static Bytes |
Bytes.from(BitSet set)
Creates a new instance from given
BitSet. |
static Bytes |
Bytes.from(boolean booleanValue)
Creates a new instance from given boolean.
|
static Bytes |
Bytes.from(byte singleByte)
Creates a new single array element array instance from given byte
|
static Bytes |
Bytes.from(byte[]... moreArrays)
Creates a new instance from given array of byte arrays
|
static Bytes |
Bytes.from(byte[] byteArrayToCopy)
Creates a new instance from given collections of single bytes.
|
static Bytes |
Bytes.from(Byte[] boxedObjectArray)
Creates a new instance from given object byte array.
|
static Bytes |
Bytes.from(byte[] array,
int offset,
int length)
Creates a new instance from a slice of given array
|
static Bytes |
Bytes.from(ByteBuffer buffer)
Creates a new instance from given
ByteBuffer. |
static Bytes |
Bytes.from(byte firstByte,
byte... moreBytes)
Creates a new instance from given collections of single bytes.
|
static Bytes |
Bytes.from(Bytes... moreBytes)
Creates a new instance from given array of byte arrays
|
static Bytes |
Bytes.from(char char2Byte)
Creates a new instance from given unsigned 2 byte char.
|
static Bytes |
Bytes.from(char[] charArray)
Creates a new instance from given char array using utf-8 encoding
|
static Bytes |
Bytes.from(char[] charArray,
Charset charset)
Creates a new instance from given char array.
|
static Bytes |
Bytes.from(char[] charArray,
Charset charset,
int offset,
int length)
Creates a new instance from given char array with given range.
|
static Bytes |
Bytes.from(CharBuffer buffer)
Creates a new instance from given
CharBuffer. |
static Bytes |
Bytes.from(CharSequence utf8String)
Creates a new instance from given utf-8 encoded string
|
static Bytes |
Bytes.from(CharSequence string,
Charset charset)
Creates a new instance from given string
|
static Bytes |
Bytes.from(CharSequence utf8String,
Normalizer.Form form)
Creates a new instance from normalized form of given utf-8 encoded string
|
static Bytes |
Bytes.from(Collection<Byte> bytesCollection)
Creates a new instance from given collections.
|
static Bytes |
Bytes.from(DataInput dataInput,
int length)
Reads given
DataInput and creates a new instance from read data |
static Bytes |
Bytes.from(double... doubleArray)
Creates a new instance from given double array.
|
static Bytes |
Bytes.from(double double8Byte)
Creates a new instance from given 8 byte floating point number (double).
|
static Bytes |
Bytes.from(File file)
Reads given file and returns the byte content.
|
static Bytes |
Bytes.from(File file,
int offset,
int length)
Reads given file and returns the byte content.
|
static Bytes |
Bytes.from(float... floatArray)
Creates a new instance from given float array.
|
static Bytes |
Bytes.from(float float4byte)
Creates a new instance from given 4 byte floating point number (float).
|
static Bytes |
Bytes.from(InputStream stream)
Reads given whole input stream and creates a new instance from read data
|
static Bytes |
Bytes.from(InputStream stream,
int maxLength)
Reads given input stream up to maxLength and creates a new instance from read data.
|
static Bytes |
Bytes.from(int... intArray)
Creates a new instance from given 4 byte integer array.
|
static Bytes |
Bytes.from(int integer4byte)
Creates a new instance from given 4 byte integer.
|
static Bytes |
Bytes.from(IntBuffer buffer)
Creates a new instance from given
IntBuffer. |
static Bytes |
Bytes.from(long... longArray)
Creates a new instance from given 8 byte long array.
|
static Bytes |
Bytes.from(long long8byte)
Creates a new instance from given 8 byte long.
|
static Bytes |
Bytes.from(short short2Byte)
Creates a new instance from given 2 byte short.
|
static Bytes |
Bytes.from(UUID uuid)
Convert UUID to a newly generated 16 byte long array representation.
|
static Bytes |
Bytes.fromNullSafe(byte[] byteArrayToCopy)
Creates a new instance from given collections of single bytes.
|
Bytes |
Bytes.hash(String algorithm)
Calculates hash with provided algorithm on the underlying byte array and returns a byte instance
containing the hash.
|
Bytes |
Bytes.hashMd5()
Calculates md5 on the underlying byte array and returns a byte instance containing the hash.
|
Bytes |
Bytes.hashSha1()
Calculates sha1 on the underlying byte array and returns a byte instance containing the hash.
|
Bytes |
Bytes.hashSha256()
Calculates sha256 on the underlying byte array and returns a byte instance containing the hash.
|
Bytes |
MutableBytes.immutable()
Convert this instance to an immutable version with the same reference of the internal array and byte-order.
|
Bytes |
Bytes.leftShift(int shiftCount)
Bitwise left shifting of internal byte array (i.e.
|
Bytes |
Bytes.not()
Bitwise not operation on the whole internal byte array.
|
Bytes |
Bytes.or(byte[] secondArray)
Bitwise OR operation on the whole internal byte array.
|
Bytes |
Bytes.or(Bytes bytes)
Bitwise OR operation on the whole internal byte array.
|
static Bytes |
Bytes.parse(CharSequence encoded,
BinaryToTextEncoding.Decoder decoder)
Parsing of arbitrary encoded format
|
static Bytes |
Bytes.parseBase32(CharSequence base32Rfc4648String)
Parsing of base32/RFC 4648 encoded byte arrays.
|
static Bytes |
Bytes.parseBase36(CharSequence base36String)
Deprecated.
use
parseRadix(CharSequence, int) with 36 instead; will be removed in v1.0+ |
static Bytes |
Bytes.parseBase64(CharSequence base64String)
Parsing of base64 encoded byte arrays.
|
static Bytes |
Bytes.parseBinary(CharSequence binaryString)
Parses a big endian binary string (e.g.
|
static Bytes |
Bytes.parseDec(CharSequence decString)
Parsing of decimal encoded byte arrays.
|
static Bytes |
Bytes.parseHex(CharSequence hexString)
Parsing of base16/HEX encoded byte arrays.
|
static Bytes |
Bytes.parseOctal(CharSequence octalString)
Parsing of octal encoded byte arrays.
|
static Bytes |
Bytes.parseRadix(CharSequence radixNumberString,
int radix)
Encodes with given radix string representation (e.g.
|
static Bytes |
Bytes.random(int length)
A new instance with random bytes.
|
static Bytes |
Bytes.random(int length,
Random random)
A new instance with random bytes.
|
Bytes |
Bytes.resize(int newByteLength)
Copies the specified array, truncating or padding with zeros (if necessary)
so the copy has the specified length.
|
Bytes |
Bytes.resize(int newByteLength,
BytesTransformer.ResizeTransformer.Mode mode)
Copies the specified array, truncating or padding with zeros (if necessary)
so the copy has the specified length.
|
Bytes |
Bytes.reverse()
Reverses the internal bytes in the array (not bits in each byte)
|
Bytes |
Bytes.rightShift(int shiftCount)
Bitwise unsigned/logical right shifting of internal byte array (i.e.
|
Bytes |
Bytes.switchBit(int bitPosition)
Returns a Byte whose value is equivalent to this Byte with the designated bit switched.
|
Bytes |
Bytes.switchBit(int bitPosition,
boolean newBitValue)
Returns a Byte whose value is equivalent to this Byte with the designated bit set to newBitValue.
|
Bytes |
Bytes.transform(BytesTransformer transformer)
Generic transformation of this instance.
|
static Bytes |
Bytes.unsecureRandom(int length)
A new instance with pseudo random bytes using an unsecure random number generator.
|
static Bytes |
Bytes.unsecureRandom(int length,
long seed)
A new instance with pseudo random bytes using an unsecure random number generator.
|
static Bytes |
Bytes.wrap(byte[] array)
Creates a new instance with given byte array.
|
static Bytes |
Bytes.wrap(byte[] array,
ByteOrder byteOrder)
Creates a new instance with given byte array.
|
Bytes |
BytesFactory.wrap(byte[] array,
ByteOrder byteOrder)
Create an instance with given array and order
|
static Bytes |
Bytes.wrap(Bytes bytes)
Creates a new reference backed by the same byte array.
|
static Bytes |
Bytes.wrapNullSafe(byte[] array)
Creates a new instance with given byte array.
|
Bytes |
Bytes.xor(byte[] secondArray)
Bitwise XOR operation on the whole internal byte array.
|
Bytes |
Bytes.xor(Bytes bytes)
Bitwise XOR operation on the whole internal byte array.
|
| Modifier and Type | Method and Description |
|---|---|
Bytes |
Bytes.and(Bytes bytes)
Bitwise AND operation on the whole internal byte array.
|
Bytes |
Bytes.append(Bytes bytes)
Creates a new instance with the current array appended to the provided data (ie.
|
int |
Bytes.compareTo(Bytes o)
Compares this bytes instance to another.
|
boolean |
Bytes.equalsContent(Bytes other)
Checks only for internal array content
|
static Bytes |
Bytes.from(Bytes... moreBytes)
Creates a new instance from given array of byte arrays
|
Bytes |
Bytes.or(Bytes bytes)
Bitwise OR operation on the whole internal byte array.
|
MutableBytes |
MutableBytes.overwrite(Bytes newBytes)
Uses given Bytes array to overwrite internal array
|
MutableBytes |
MutableBytes.overwrite(Bytes newBytes,
int offsetInternalArray)
Uses given Bytes array to overwrite internal array.
|
static Bytes |
Bytes.wrap(Bytes bytes)
Creates a new reference backed by the same byte array.
|
Bytes |
Bytes.xor(Bytes bytes)
Bitwise XOR operation on the whole internal byte array.
|
Copyright © 2017–2021. All rights reserved.