Class NullAppendable
java.lang.Object
org.eclipse.jetty.util.Utf8StringBuilder
org.eclipse.jetty.websocket.core.internal.NullAppendable
- All Implemented Interfaces:
CharsetStringBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.Utf8StringBuilder
Utf8StringBuilder.Utf8CharacterCodingException, Utf8StringBuilder.Utf8IllegalArgumentExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.CharsetStringBuilder
CharsetStringBuilder.DecoderStringBuilder, CharsetStringBuilder.Iso88591StringBuilder, CharsetStringBuilder.ReportingUtf8StringBuilder, CharsetStringBuilder.UsAsciiStringBuilder -
Field Summary
Fields inherited from class org.eclipse.jetty.util.Utf8StringBuilder
_state, REPLACEMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(char c) voidappend(CharSequence chars, int offset, int length) voidvoidprotected voidbufferAppend(char c) protected voidbuild()Build the completed string and reset the buffer.takeCompleteString(Supplier<X> onCodingError) Take the completely decoded string.takePartialString(Supplier<X> onCodingError) Take the partially decoded string.Get the completely decoded string, which is equivalent to callingUtf8StringBuilder.complete()thenUtf8StringBuilder.toString().Methods inherited from class org.eclipse.jetty.util.Utf8StringBuilder
append, append, append, append, append, appendByte, checkCharAppend, complete, hasCodingErrors, isComplete, length, partialReset, replaceIncomplete, reset, toString
-
Constructor Details
-
NullAppendable
public NullAppendable()
-
-
Method Details
-
append
- Parameters:
chars- sequence of decoded charactersoffset- offset into the arraylength- the number of character to append from the sequence.
-
append
public void append(char c) - Specified by:
appendin interfaceCharsetStringBuilder- Overrides:
appendin classUtf8StringBuilder- Parameters:
c- A decoded character to append
-
append
- Overrides:
appendin classUtf8StringBuilder
-
append
- Overrides:
appendin classUtf8StringBuilder
-
bufferAppend
protected void bufferAppend(char c) - Overrides:
bufferAppendin classUtf8StringBuilder
-
bufferReset
protected void bufferReset()- Overrides:
bufferResetin classUtf8StringBuilder
-
toPartialString
- Overrides:
toPartialStringin classUtf8StringBuilder- Returns:
- The currently decoded string, excluding any partial sequences appended.
-
toCompleteString
Description copied from class:Utf8StringBuilderGet the completely decoded string, which is equivalent to callingUtf8StringBuilder.complete()thenUtf8StringBuilder.toString().- Overrides:
toCompleteStringin classUtf8StringBuilder- Returns:
- The completely decoded string.
-
takeCompleteString
Description copied from class:Utf8StringBuilderTake the completely decoded string.- Overrides:
takeCompleteStringin classUtf8StringBuilder- Type Parameters:
X- The type of the exception thrown- Parameters:
onCodingError- A supplier of aThrowableto use ifUtf8StringBuilder.hasCodingErrors()returns true, or null for no error action- Returns:
- The complete string.
- Throws:
X- ifUtf8StringBuilder.hasCodingErrors()is true afterUtf8StringBuilder.complete().
-
takePartialString
Description copied from class:Utf8StringBuilderTake the partially decoded string.- Overrides:
takePartialStringin classUtf8StringBuilder- Type Parameters:
X- The type of the exception thrown- Parameters:
onCodingError- A supplier of aThrowableto use ifUtf8StringBuilder.hasCodingErrors()returns true, or null for no error action- Returns:
- The complete string.
- Throws:
X- ifUtf8StringBuilder.hasCodingErrors()is true afterUtf8StringBuilder.complete().
-
build
Description copied from interface:CharsetStringBuilderBuild the completed string and reset the buffer.
- Specified by:
buildin interfaceCharsetStringBuilder- Overrides:
buildin classUtf8StringBuilder- Returns:
- The decoded built string which must be complete in regard to any multibyte sequences.
- Throws:
CharacterCodingException- If the bytes cannot be correctly decoded or a multibyte sequence is incomplete.
-