Package org.eclipse.jetty.util
Class CharsetStringBuilder.DecoderStringBuilder
- java.lang.Object
-
- org.eclipse.jetty.util.CharsetStringBuilder.DecoderStringBuilder
-
- All Implemented Interfaces:
CharsetStringBuilder
- Enclosing interface:
- CharsetStringBuilder
public static class CharsetStringBuilder.DecoderStringBuilder extends java.lang.Object implements CharsetStringBuilder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.CharsetStringBuilder
CharsetStringBuilder.DecoderStringBuilder, CharsetStringBuilder.Iso88591StringBuilder, CharsetStringBuilder.UsAsciiStringBuilder
-
-
Constructor Summary
Constructors Constructor Description DecoderStringBuilder(java.nio.charset.CharsetDecoder charsetDecoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(byte b)voidappend(byte[] b, int offset, int length)voidappend(char c)voidappend(java.lang.CharSequence chars, int offset, int length)voidappend(java.nio.ByteBuffer buf)java.lang.Stringbuild()Build the completed string and reset the buffer.voidreset()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.CharsetStringBuilder
append
-
-
-
-
Method Detail
-
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
public void append(java.lang.CharSequence chars, int offset, int length)- Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
chars- sequence of decoded charactersoffset- offset into the arraylength- the number of character to append from the sequence.
-
append
public void append(byte[] b, int offset, int length)- Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
b- Array of encoded bytesoffset- offset into the arraylength- the number of bytes to append from the array.
-
append
public void append(java.nio.ByteBuffer buf)
- Specified by:
appendin interfaceCharsetStringBuilder- Parameters:
buf- Buffer of encoded bytes to append. The bytes are consumed from the buffer.
-
build
public java.lang.String build() throws java.nio.charset.CharacterCodingExceptionDescription 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.
- Throws:
java.nio.charset.CharacterCodingException- If the bytes cannot be correctly decoded or a multibyte sequence is incomplete.
-
reset
public void reset()
- Specified by:
resetin interfaceCharsetStringBuilder
-
-