| Modifier and Type | Class and Description |
|---|---|
class |
MutableBytes
Mutable version of
Bytes. |
class |
ReadOnlyBytes |
| 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[] 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(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.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.from(BitSet set)
Creates a new instance from given BitSet.
|
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[] 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(char char2Byte)
Creates a new instance from given unsigned 2 byte char.
|
static Bytes |
Bytes.from(Collection<Byte> bytesCollection)
Creates a new instance from given collections.
|
static Bytes |
Bytes.from(InputStream stream)
Reads given input stream and creates a new instance from read data
|
static Bytes |
Bytes.from(int integer4byte)
Creates a new instance from given 4 byte integer.
|
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(String utf8String)
Creates a new instance from given utf-8 encoded string
|
static Bytes |
Bytes.from(String string,
Charset charset)
Creates a new instance from given string
|
static Bytes |
Bytes.from(String utf8String,
Normalizer.Form form)
Creates a new instance from normalized form of given utf-8 encoded string
|
Bytes |
Bytes.leftShift(int shiftCount)
Bitwise left shifting of internal byte array.
|
Bytes |
Bytes.negate()
Bitwise negate 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(String encoded,
BinaryToTextEncoding.Decoder decoder)
Parsing of arbitrary encoded format
|
static Bytes |
Bytes.parseBase36(String base36String)
Parsing of base36 encoded byte arrays.
|
static Bytes |
Bytes.parseBase64(String base64String)
Parsing of base64 encoded byte arrays.
|
static Bytes |
Bytes.parseDec(String decString)
Parsing of decimal encoded byte arrays.
|
static Bytes |
Bytes.parseHex(String hexString)
Parsing of base16/HEX encoded byte arrays.
|
static Bytes |
Bytes.parseOctal(String octalString)
Parsing of octal encoded byte arrays.
|
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.reverse()
Reverses the internal byte array.
|
Bytes |
Bytes.rightShift(int shiftCount)
Bitwise right shifting of internal byte array.
|
Bytes |
Bytes.shuffle()
Shuffles the internal byte array with a new
SecureRandom instance. |
Bytes |
Bytes.shuffle(Random random)
Shuffles the internal byte array
|
Bytes |
Bytes.sort()
Sorts the internal byte array with it's natural ordering
|
Bytes |
Bytes.sort(Comparator<Byte> comparator)
Sorts the internal byte array according to given comparator.
|
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.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) |
static Bytes |
Bytes.wrap(Bytes bytes)
Creates a new reference backed by the same 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
|
Bytes |
Bytes.or(Bytes bytes)
Bitwise OR operation on the whole internal byte 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. All rights reserved.