- java.lang.Object
-
- io.netty5.util.CharsetUtil
-
-
Field Summary
Fields Modifier and Type Field Description static Charset
ISO_8859_1
ISO Latin Alphabet No. 1, as known as ISO-LATIN-1static Charset
US_ASCII
7-bit ASCII, as known as ISO646-US or the Basic Latin block of the Unicode character setstatic Charset
UTF_16
16-bit UTF (UCS Transformation Format) whose byte order is identified by an optional byte-order markstatic Charset
UTF_16BE
16-bit UTF (UCS Transformation Format) whose byte order is big-endianstatic Charset
UTF_16LE
16-bit UTF (UCS Transformation Format) whose byte order is little-endianstatic Charset
UTF_8
8-bit UTF (UCS Transformation Format)
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CharsetDecoder
decoder(Charset charset)
Returns a cached thread-localCharsetDecoder
for the specifiedCharset
.static CharsetDecoder
decoder(Charset charset, CodingErrorAction codingErrorAction)
Returns a newCharsetDecoder
for theCharset
with the specified error action.static CharsetDecoder
decoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction)
Returns a newCharsetDecoder
for theCharset
with specified error actions.static CharsetEncoder
encoder(Charset charset)
Returns a cached thread-localCharsetEncoder
for the specifiedCharset
.static CharsetEncoder
encoder(Charset charset, CodingErrorAction codingErrorAction)
Returns a newCharsetEncoder
for theCharset
with the specified error action.static CharsetEncoder
encoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction)
Returns a newCharsetEncoder
for theCharset
with specified error actions.static CharsetDecoder
getDecoder(Charset charset)
Deprecated.Usedecoder(Charset)
.static CharsetEncoder
getEncoder(Charset charset)
Deprecated.Useencoder(Charset)
.
-
-
-
Field Detail
-
UTF_16
public static final Charset UTF_16
16-bit UTF (UCS Transformation Format) whose byte order is identified by an optional byte-order mark
-
UTF_16BE
public static final Charset UTF_16BE
16-bit UTF (UCS Transformation Format) whose byte order is big-endian
-
UTF_16LE
public static final Charset UTF_16LE
16-bit UTF (UCS Transformation Format) whose byte order is little-endian
-
UTF_8
public static final Charset UTF_8
8-bit UTF (UCS Transformation Format)
-
ISO_8859_1
public static final Charset ISO_8859_1
ISO Latin Alphabet No. 1, as known as ISO-LATIN-1
-
US_ASCII
public static final Charset US_ASCII
7-bit ASCII, as known as ISO646-US or the Basic Latin block of the Unicode character set
-
-
Method Detail
-
getEncoder
@Deprecated public static CharsetEncoder getEncoder(Charset charset)
Deprecated.Useencoder(Charset)
.
-
encoder
public static CharsetEncoder encoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction)
Returns a newCharsetEncoder
for theCharset
with 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
public static CharsetEncoder encoder(Charset charset, CodingErrorAction codingErrorAction)
Returns a newCharsetEncoder
for theCharset
with 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
public static CharsetEncoder encoder(Charset charset)
Returns a cached thread-localCharsetEncoder
for the specifiedCharset
.- Parameters:
charset
- The specified charset- Returns:
- The encoder for the specified
charset
-
getDecoder
@Deprecated public static CharsetDecoder getDecoder(Charset charset)
Deprecated.Usedecoder(Charset)
.
-
decoder
public static CharsetDecoder decoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction)
Returns a newCharsetDecoder
for theCharset
with 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
public static CharsetDecoder decoder(Charset charset, CodingErrorAction codingErrorAction)
Returns a newCharsetDecoder
for theCharset
with 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
public static CharsetDecoder decoder(Charset charset)
Returns a cached thread-localCharsetDecoder
for the specifiedCharset
.- Parameters:
charset
- The specified charset- Returns:
- The decoder for the specified
charset
-
-