Top Description Fields Constructors Methods
org.jboss.logmanager.handlers

pack-priv final Class ByteStringBuilder

extends Object
implements Appendable
Class Inheritance
All Implemented Interfaces
java.lang.Appendable
Annotations
@SuppressWarnings:unused, WeakerAccess
Imports
java.util.Arrays

This builder is not thread-safe.
Authors
David M. Lloyd, James R. Perkins

Field Summary

Modifier and TypeField and Description
private byte[]
private static final int
private static final int
private int

Constructor Summary

AccessConstructor and Description
public
ByteStringBuilder(final int len)

Method Summary

Modifier and TypeMethod and Description
public ByteStringBuilder
append(final boolean b)

public Appendable
append(CharSequence
The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.
csq
)

Implements java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

public Appendable
append(CharSequence
The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".
csq
,
int
The index of the first character in the subsequence
start
,
int
The index of the character following the last character in the subsequence
end
)

Implements java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

public ByteStringBuilder
append(final char
The character to append
c
)

Implements java.lang.Appendable.append.

Appends the specified character to this Appendable.

public ByteStringBuilder
append(final byte[] bytes)

public ByteStringBuilder
append(final byte[] bytes, final int offs, final int len)

public ByteStringBuilder
append(final String s)

public ByteStringBuilder
append(final String s, final int offs, final int len)

public ByteStringBuilder
append(final int i)

public ByteStringBuilder
append(final long l)

public ByteStringBuilder
private ByteStringBuilder
appendASCII(final int asciiLen, final String s, final int offs, final int len, final int maxLen)

private ByteStringBuilder
appendASCII(final int minChar, final int maxChar, final String s, final int offs, final int len, final int maxLen)

public ByteStringBuilder
public ByteStringBuilder
appendLatin1(final String s, final int offs, final int len)

public ByteStringBuilder
public ByteStringBuilder
appendPrintUSASCII(final String s, final int maxLen)

public ByteStringBuilder
appendPrintUSASCII(final String s, final int offs, final int len)

public ByteStringBuilder
public ByteStringBuilder
appendUSASCII(final String s, final int maxLen)

public ByteStringBuilder
appendUSASCII(final String s, final int offs, final int len)

public ByteStringBuilder
appendUtf8Raw(final int codePoint)

public byte
byteAt(final int index)

public int
public boolean
contentEquals(final byte[] other)

public boolean
contentEquals(final byte[] other, final int offs, final int length)

private void
doAppend(final byte b)

private void
doAppendNoCheck(final byte b)

public static int
getUtf8LengthOf(final int c)

public int
private void
reserve(final int count, final boolean clear)

public void
setLength(final int newLength)

public byte[]
public int
write(final String s, final int limit)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private byte[] content
INVALID_US_ASCII_CODE_POINTback to summary
private static final int INVALID_US_ASCII_CODE_POINT
INVALID_UTF_8_CODE_POINTback to summary
private static final int INVALID_UTF_8_CODE_POINT
lengthback to summary
private int length

Constructor Detail

ByteStringBuilderback to summary
public ByteStringBuilder(final int len)

Method Detail

appendback to summary
public ByteStringBuilder append(final boolean b)
appendback to summary
public Appendable append(CharSequence csq)

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

Depending on which class implements the character sequence csq, the entire sequence may not be appended. For instance, if csq is a java.nio.CharBuffer then the subsequence to append is defined by the buffer's position and limit.

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
csq:CharSequence

The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.

Returns:Appendable

A reference to this Appendable

Annotations
@Override
appendback to summary
public Appendable append(CharSequence csq, int start, int end)

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

    out.append(csq.subSequence(start, end)) 

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
csq:CharSequence

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start:int

The index of the first character in the subsequence

end:int

The index of the character following the last character in the subsequence

Returns:Appendable

A reference to this Appendable

Annotations
@Override
appendback to summary
public ByteStringBuilder append(final char c)

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character to this Appendable.

Parameters
c:char

The character to append

Returns:ByteStringBuilder

A reference to this Appendable

appendback to summary
public ByteStringBuilder append(final byte[] bytes)
appendback to summary
public ByteStringBuilder append(final byte[] bytes, final int offs, final int len)
appendback to summary
public ByteStringBuilder append(final String s)
appendback to summary
public ByteStringBuilder append(final String s, final int offs, final int len)
appendback to summary
public ByteStringBuilder append(final int i)
appendback to summary
public ByteStringBuilder append(final long l)
appendback to summary
public ByteStringBuilder append(final ByteStringBuilder other)
appendASCIIback to summary
private ByteStringBuilder appendASCII(final int asciiLen, final String s, final int offs, final int len, final int maxLen)
appendASCIIback to summary
private ByteStringBuilder appendASCII(final int minChar, final int maxChar, final String s, final int offs, final int len, final int maxLen)
appendLatin1back to summary
public ByteStringBuilder appendLatin1(final String s)
appendLatin1back to summary
public ByteStringBuilder appendLatin1(final String s, final int offs, final int len)
appendPrintUSASCIIback to summary
public ByteStringBuilder appendPrintUSASCII(final String s)
appendPrintUSASCIIback to summary
public ByteStringBuilder appendPrintUSASCII(final String s, final int maxLen)
appendPrintUSASCIIback to summary
public ByteStringBuilder appendPrintUSASCII(final String s, final int offs, final int len)
appendUSASCIIback to summary
public ByteStringBuilder appendUSASCII(final String s)
appendUSASCIIback to summary
public ByteStringBuilder appendUSASCII(final String s, final int maxLen)
appendUSASCIIback to summary
public ByteStringBuilder appendUSASCII(final String s, final int offs, final int len)
appendUtf8Rawback to summary
public ByteStringBuilder appendUtf8Raw(final int codePoint)
byteAtback to summary
public byte byteAt(final int index)
capacityback to summary
public int capacity()
contentEqualsback to summary
public boolean contentEquals(final byte[] other)
contentEqualsback to summary
public boolean contentEquals(final byte[] other, final int offs, final int length)
doAppendback to summary
private void doAppend(final byte b)
doAppendNoCheckback to summary
private void doAppendNoCheck(final byte b)
getUtf8LengthOfback to summary
public static int getUtf8LengthOf(final int c)
lengthback to summary
public int length()
reserveback to summary
private void reserve(final int count, final boolean clear)
setLengthback to summary
public void setLength(final int newLength)
toArrayback to summary
public byte[] toArray()
writeback to summary
public int write(final String s, final int limit)