public final class ECIStringBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.StringBuilder |
currentBytes |
private java.nio.charset.Charset |
currentCharset |
private java.lang.StringBuilder |
result |
Constructor and Description |
---|
ECIStringBuilder() |
ECIStringBuilder(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
append(byte value)
Appends
value as a byte value |
void |
append(char value)
Appends
value as a byte value |
void |
append(int value)
Append the string repesentation of
value (short for append(String.valueOf(value)) ) |
void |
append(java.lang.String value)
Appends the characters in
value as bytes values |
void |
appendCharacters(java.lang.StringBuilder value)
Appends the characters from
value (unlike all other append methods of this class who append bytes) |
void |
appendECI(int value)
Appends ECI value to output.
|
private void |
encodeCurrentBytesIfAny() |
boolean |
isEmpty() |
int |
length()
Short for
toString().length() (if possible, use isEmpty() instead) |
java.lang.String |
toString() |
private java.lang.StringBuilder currentBytes
private java.lang.StringBuilder result
private java.nio.charset.Charset currentCharset
public ECIStringBuilder()
public ECIStringBuilder(int initialCapacity)
public void append(char value)
value
as a byte valuevalue
- character whose lowest byte is to be appendedpublic void append(byte value)
value
as a byte valuevalue
- byte to appendpublic void append(java.lang.String value)
value
as bytes valuesvalue
- string to appendpublic void append(int value)
value
(short for append(String.valueOf(value))
)value
- int to append as a stringpublic void appendECI(int value) throws FormatException
value
- ECI value to append, as an intFormatException
- on invalid ECI valueprivate void encodeCurrentBytesIfAny()
public void appendCharacters(java.lang.StringBuilder value)
value
(unlike all other append methods of this class who append bytes)value
- characters to appendpublic int length()
toString().length()
(if possible, use isEmpty()
instead)public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object