Class CharsetStringBuilder.Iso88591StringBuilder
java.lang.Object
org.eclipse.jetty.util.CharsetStringBuilder.Iso88591StringBuilder
- All Implemented Interfaces:
CharsetStringBuilder
- Enclosing interface:
CharsetStringBuilder
public static class CharsetStringBuilder.Iso88591StringBuilder
extends Object
implements CharsetStringBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface CharsetStringBuilder
CharsetStringBuilder.DecoderStringBuilder, CharsetStringBuilder.Iso88591StringBuilder, CharsetStringBuilder.UsAsciiStringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(byte b) voidappend(char c) voidappend(CharSequence chars, int offset, int length) build()Build the completed string and reset the buffer.build(boolean ignored) Attempt to build the completed string and reset the buffer, returning a partial string if there are encoding errorsintlength()voidreset()Resets this sequence to be empty.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CharsetStringBuilder
append, append, append, hasCodingErrors, replaceIncomplete
-
Constructor Details
-
Iso88591StringBuilder
public Iso88591StringBuilder()
-
-
Method Details
-
append
public void append(byte b) - Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
b- An encoded byte to append
-
append
public void append(char c) - Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
c- A decoded character to append
-
append
- Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
chars- sequence of decoded charactersoffset- offset into the arraylength- the number of character to append from the sequence.
-
build
Description copied from interface:CharsetStringBuilderBuild the completed string and reset the buffer.
- Specified by:
buildin interfaceCharsetStringBuilder- Returns:
- The decoded built string which must be complete in regard to any multibyte sequences.
-
build
Description copied from interface:CharsetStringBuilderAttempt to build the completed string and reset the buffer, returning a partial string if there are encoding errors
Note, only some implementations support the
allowPartialStringparameter- Specified by:
buildin interfaceCharsetStringBuilder- Parameters:
ignored- true if a partial string is allowed to be returned, false means if complete string cannot be returned, an exception is thrown.- Returns:
- The available string (complete or partial)
-
length
public int length()- Specified by:
lengthin interfaceCharsetStringBuilder- Returns:
- the length in characters
-
reset
public void reset()Description copied from interface:CharsetStringBuilderResets this sequence to be empty.
- Specified by:
resetin interfaceCharsetStringBuilder
-