Package org.wildfly.common.bytes
Class ByteStringBuilder
- java.lang.Object
-
- org.wildfly.common.bytes.ByteStringBuilder
-
public final class ByteStringBuilder extends Object
A builder for byte arrays.
-
-
Constructor Summary
Constructors Constructor Description ByteStringBuilder()ByteStringBuilder(byte[] content)
-
Method Summary
-
-
-
Method Detail
-
append
public ByteStringBuilder append(boolean b)
-
append
public ByteStringBuilder append(byte b)
-
append
public ByteStringBuilder append(char c)
-
appendUtf8Raw
public ByteStringBuilder appendUtf8Raw(int codePoint)
-
appendUtf8
public ByteStringBuilder appendUtf8(CodePointIterator iterator)
-
appendLatin1
public ByteStringBuilder appendLatin1(CodePointIterator iterator)
-
appendAscii
public ByteStringBuilder appendAscii(CodePointIterator iterator)
-
append
public ByteStringBuilder append(ByteIterator iterator)
-
append
public ByteStringBuilder append(byte[] bytes)
-
append
public ByteStringBuilder append(byte[] bytes, int offs, int len)
-
appendLatin1
public ByteStringBuilder appendLatin1(CharSequence s)
-
appendLatin1
public ByteStringBuilder appendLatin1(CharSequence s, int offs, int len)
-
appendLatin1
public ByteStringBuilder appendLatin1(String s)
-
appendLatin1
public ByteStringBuilder appendLatin1(String s, int offs, int len)
-
append
public ByteStringBuilder append(CharSequence s)
-
append
public ByteStringBuilder append(CharSequence s, int offs, int len)
-
append
public ByteStringBuilder append(String s)
-
append
public ByteStringBuilder append(String s, int offs, int len)
-
appendPackedUnsignedBE
public ByteStringBuilder appendPackedUnsignedBE(int v)
-
appendPackedUnsignedBE
public ByteStringBuilder appendPackedUnsignedBE(long v)
-
appendBE
public ByteStringBuilder appendBE(short s)
-
appendNumber
public ByteStringBuilder appendNumber(int i)
-
appendBE
public ByteStringBuilder appendBE(int i)
-
appendNumber
public ByteStringBuilder appendNumber(long l)
-
appendBE
public ByteStringBuilder appendBE(long l)
-
appendObject
public ByteStringBuilder appendObject(Object o)
-
append
public ByteStringBuilder append(ByteStringBuilder other)
-
updateDigest
public ByteStringBuilder updateDigest(MessageDigest messageDigest)
-
appendDigestResult
public ByteStringBuilder appendDigestResult(MessageDigest messageDigest) throws DigestException
- Throws:
DigestException
-
updateMac
public ByteStringBuilder updateMac(Mac mac)
-
toArray
public byte[] toArray()
-
byteAt
public byte byteAt(int index)
-
capacity
public int capacity()
-
length
public int length()
-
setLength
public void setLength(int newLength)
-
contentEquals
public boolean contentEquals(byte[] other)
-
contentEquals
public boolean contentEquals(byte[] other, int offs, int length)
-
iterate
public ByteIterator iterate()
-
-