Class CharsetUtil
java.lang.Object
io.netty.util.CharsetUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CharsetISO Latin Alphabet No. 1, as known as ISO-LATIN-1static final Charset7-bit ASCII, as known as ISO646-US or the Basic Latin block of the Unicode character setstatic final Charset16-bit UTF (UCS Transformation Format) whose byte order is identified by an optional byte-order markstatic final Charset16-bit UTF (UCS Transformation Format) whose byte order is big-endianstatic final Charset16-bit UTF (UCS Transformation Format) whose byte order is little-endianstatic final Charset8-bit UTF (UCS Transformation Format) -
Method Summary
Modifier and TypeMethodDescriptionstatic CharsetDecoderReturns a cached thread-localCharsetDecoderfor the specifiedCharset.static CharsetDecoderdecoder(Charset charset, CodingErrorAction codingErrorAction) Returns a newCharsetDecoderfor theCharsetwith the specified error action.static CharsetDecoderdecoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) Returns a newCharsetDecoderfor theCharsetwith specified error actions.static CharsetEncoderReturns a cached thread-localCharsetEncoderfor the specifiedCharset.static CharsetEncoderencoder(Charset charset, CodingErrorAction codingErrorAction) Returns a newCharsetEncoderfor theCharsetwith the specified error action.static CharsetEncoderencoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) Returns a newCharsetEncoderfor theCharsetwith specified error actions.static CharsetDecodergetDecoder(Charset charset) Deprecated.static CharsetEncodergetEncoder(Charset charset) Deprecated.Useencoder(Charset).static Charset[]values()
-
Field Details
-
UTF_16
16-bit UTF (UCS Transformation Format) whose byte order is identified by an optional byte-order mark -
UTF_16BE
16-bit UTF (UCS Transformation Format) whose byte order is big-endian -
UTF_16LE
16-bit UTF (UCS Transformation Format) whose byte order is little-endian -
UTF_8
8-bit UTF (UCS Transformation Format) -
ISO_8859_1
ISO Latin Alphabet No. 1, as known as ISO-LATIN-1 -
US_ASCII
7-bit ASCII, as known as ISO646-US or the Basic Latin block of the Unicode character set
-
-
Method Details
-
values
-
getEncoder
Deprecated.Useencoder(Charset). -
encoder
public static CharsetEncoder encoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) Returns a newCharsetEncoderfor theCharsetwith specified error actions.- Parameters:
charset- The specified charsetmalformedInputAction- The encoder's action for malformed-input errorsunmappableCharacterAction- The encoder's action for unmappable-character errors- Returns:
- The encoder for the specified
charset
-
encoder
Returns a newCharsetEncoderfor theCharsetwith the specified error action.- Parameters:
charset- The specified charsetcodingErrorAction- The encoder's action for malformed-input and unmappable-character errors- Returns:
- The encoder for the specified
charset
-
encoder
Returns a cached thread-localCharsetEncoderfor the specifiedCharset.- Parameters:
charset- The specified charset- Returns:
- The encoder for the specified
charset
-
getDecoder
Deprecated.Usedecoder(Charset). -
decoder
public static CharsetDecoder decoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) Returns a newCharsetDecoderfor theCharsetwith specified error actions.- Parameters:
charset- The specified charsetmalformedInputAction- The decoder's action for malformed-input errorsunmappableCharacterAction- The decoder's action for unmappable-character errors- Returns:
- The decoder for the specified
charset
-
decoder
Returns a newCharsetDecoderfor theCharsetwith the specified error action.- Parameters:
charset- The specified charsetcodingErrorAction- The decoder's action for malformed-input and unmappable-character errors- Returns:
- The decoder for the specified
charset
-
decoder
Returns a cached thread-localCharsetDecoderfor the specifiedCharset.- Parameters:
charset- The specified charset- Returns:
- The decoder for the specified
charset
-
decoder(Charset).