Bytes is a utility library that makes it easy to create, parse, transform, validate and convert byte arrays in Java. It supports endianness as well as immutability and mutability, so the caller may decide to favor performance.
indexOf
(thx @hlyakhovich) #48toShortArray
(thx @hlyakhovich) #44from()
constructor from short
vararg or array (thx @hlyakhovich) #45leftShift()
and rightShift()
to respect byte order (thx @gfpeltier)bitAt()
to respect byte order (thx @gfpeltier)unsecureRandom()
constructor which creates random for e.g. tests or deterministic randomstoFloatArray()
converter #30toDoubleArray()
converter #30append()
method supporting multiple byte arrays #26toCharArray()
method which decodes internal byte array to char[] #27encodeBase64()
supporting padding-less encodingtoIntArray()
converter #28toLongArray()
converter #29AutoCloseable
to MutableBytes interface #31allocate()
as mutable byte static constructor (thx @petrukhnov)toObjectArray()
; use toBoxedArray()
insteadIntBuffer
and CharBuffer
parse()
methods now expect more flexible CharSequence
instead of String
#23from()
constructor reading from char[]
has new version that accepts offset and length #24from()
constructor reading file with offset and length parameter #25BinaryToTextEncoding.decode()
changed param to CharSequence
from String
#23