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.Utf8IllegalArgumentException
Nested 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(char c) void
append
(CharSequence chars, int offset, int length) void
void
protected void
bufferAppend
(char c) protected void
build()
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, 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:
append
in interfaceCharsetStringBuilder
- Overrides:
append
in classUtf8StringBuilder
- Parameters:
c
- A decoded character to append
-
append
- Overrides:
append
in classUtf8StringBuilder
-
append
- Overrides:
append
in classUtf8StringBuilder
-
bufferAppend
protected void bufferAppend(char c) - Overrides:
bufferAppend
in classUtf8StringBuilder
-
bufferReset
protected void bufferReset()- Overrides:
bufferReset
in classUtf8StringBuilder
-
toPartialString
- Overrides:
toPartialString
in classUtf8StringBuilder
- Returns:
- The currently decoded string, excluding any partial sequences appended.
-
toCompleteString
Description copied from class:Utf8StringBuilder
Get the completely decoded string, which is equivalent to callingUtf8StringBuilder.complete()
thenUtf8StringBuilder.toString()
.- Overrides:
toCompleteString
in classUtf8StringBuilder
- Returns:
- The completely decoded string.
-
takeCompleteString
Description copied from class:Utf8StringBuilder
Take the completely decoded string.- Overrides:
takeCompleteString
in classUtf8StringBuilder
- Type Parameters:
X
- The type of the exception thrown- Parameters:
onCodingError
- A supplier of aThrowable
to 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:Utf8StringBuilder
Take the partially decoded string.- Overrides:
takePartialString
in classUtf8StringBuilder
- Type Parameters:
X
- The type of the exception thrown- Parameters:
onCodingError
- A supplier of aThrowable
to 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:CharsetStringBuilder
Build the completed string and reset the buffer.
- Specified by:
build
in interfaceCharsetStringBuilder
- Overrides:
build
in 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.
-