Package java.nio.charset

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

See: Description

Package java.nio.charset Description

Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.

Class name

Description

Charset A named mapping between characters
and bytes
CharsetDecoder Decodes bytes into characters
CharsetEncoder   Encodes characters into bytes
CoderResult   Describes coder results
CodingErrorAction   Describes actions to take when
coding errors are detected

  

A charset is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in RFC 2278. A decoder is an engine which transforms bytes in a specific charset into characters, and an encoder is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are collectively referred to as coders.

The Charset class defines methods for creating coders for a given charset and for retrieving the various names associated with a charset. It also defines static methods for testing whether a particular charset is supported, for locating charset instances by name, and for constructing a map that contains every charset for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing charset-related constructors and methods in the String class, together with the existing InputStreamReader and OutputStreamWriter classes, all of whose implementations have been reworked to make use of the charset facilities defined in this package. A small number of changes have been made to the InputStreamReader and OutputStreamWriter classes in order to allow explicit charset objects to be specified in the construction of instances of those classes.

Support for new charsets can be made available via the interface defined in the CharsetProvider class in the java.nio.charset.spi package.

Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Since:
1.4

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 30/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/nio/charset/package-summary.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, java.nio.charset

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut