Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
package

java.nio.charset

Classes

Charset A charset is a named mapping between Unicode characters and byte sequences. 
CharsetDecoder A converter that can convert a byte sequence from a charset into a 16-bit Unicode character sequence. 
CharsetEncoder Transforms a sequence of 16-bit Java characters to a byte sequence in some encoding. 
CoderResult Used to indicate the result of encoding/decoding. 
CodingErrorAction Used to indicate what kind of actions to take in case of encoding/decoding errors. 
StandardCharsets Convenient access to the most important built-in charsets. 

Exceptions

CharacterCodingException A CharacterCodingException is thrown when an encoding or decoding error occurs. 
IllegalCharsetNameException An IllegalCharsetNameException is thrown when an illegal charset name is encountered. 
MalformedInputException A MalformedInputException is thrown when a malformed input is encountered, for example if a byte sequence is illegal for the given charset. 
UnmappableCharacterException An UnmappableCharacterException is thrown when an unmappable character for the given charset is encountered. 
UnsupportedCharsetException An UnsupportedCharsetException is thrown when an unsupported charset name is encountered. 

Errors

CoderMalfunctionError A CoderMalfunctionError is thrown when the encoder/decoder is malfunctioning.