1N/A<!--
1N/A Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
1N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1N/A
1N/A This code is free software; you can redistribute it and/or modify it
1N/A under the terms of the GNU General Public License version 2 only, as
1N/A published by the Free Software Foundation. Oracle designates this
1N/A particular file as subject to the "Classpath" exception as provided
1N/A by Oracle in the LICENSE file that accompanied this code.
1N/A
1N/A This code is distributed in the hope that it will be useful, but WITHOUT
1N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1N/A version 2 for more details (a copy is included in the LICENSE file that
1N/A accompanied this code).
1N/A
1N/A You should have received a copy of the GNU General Public License version
1N/A 2 along with this work; if not, write to the Free Software Foundation,
1N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1N/A
1N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1N/A or visit www.oracle.com if you need additional information or have any
1N/A questions.
1N/A-->
1N/A
1N/A<!doctype html public "-//IETF//DTD HTML//EN">
1N/A<html>
1N/A<body bgcolor="white">
1N/A
1N/A
1N/ADefines charsets, decoders, and encoders, for translating between bytes and
1N/AUnicode characters.
1N/A
1N/A<blockquote><table cellspacing=1 cellpadding=0 summary="Summary of charsets, decoders, and encoders in this package">
1N/A <tr><th><p align="left">Class name</p></th><th><p align="left">Description</p></th></tr>
1N/A <tr><td valign=top><tt>{@link java.nio.charset.Charset}</tt></td>
1N/A <td>A named mapping between characters<br>and bytes</td></tr>
1N/A <tr><td valign=top><tt>{@link java.nio.charset.CharsetDecoder}</tt></td>
1N/A <td>Decodes bytes into characters</td></tr>
1N/A <tr><td valign=top><tt>{@link java.nio.charset.CharsetEncoder}&nbsp;&nbsp;</tt></td>
1N/A <td>Encodes characters into bytes</td></tr>
1N/A <tr><td valign=top><tt>{@link java.nio.charset.CoderResult}&nbsp;&nbsp;</tt></td>
1N/A <td>Describes coder results</td></tr>
1N/A <tr><td valign=top><tt>{@link java.nio.charset.CodingErrorAction}&nbsp;&nbsp;</tt></td>
1N/A <td>Describes actions to take when<br>coding errors are detected</td></tr>
1N/A
1N/A</table></blockquote>
1N/A
1N/A<p> A <i>charset</i> is named mapping between sequences of sixteen-bit Unicode
1N/Acharacters and sequences of bytes, in the sense defined in <a
1N/Ahref="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>. A
1N/A<i>decoder</i> is an engine which transforms bytes in a specific charset into
1N/Acharacters, and an <i>encoder</i> is an engine which transforms characters into
1N/Abytes. Encoders and decoders operate on byte and character buffers. They are
1N/Acollectively referred to as <i>coders</i>.
1N/A
1N/A<p> The {@link java.nio.charset.Charset} class defines methods for creating
1N/Acoders for a given charset and for retrieving the various names associated with
1N/Aa charset. It also defines static methods for testing whether a particular
1N/Acharset is supported, for locating charset instances by name, and for
1N/Aconstructing a map that contains every charset for which support is available
1N/Ain the current Java virtual machine.
1N/A
1N/A<p> Most users will not use these classes directly; instead they will use the
1N/Aexisting charset-related constructors and methods in the {@link
1N/Ajava.lang.String} class, together with the existing {@link
1N/Ajava.io.InputStreamReader} and {@link java.io.OutputStreamWriter} classes, all
1N/Aof whose implementations have been reworked to make use of the charset
1N/Afacilities defined in this package. A small number of changes have been made
1N/Ato the {@link java.io.InputStreamReader} and {@link java.io.OutputStreamWriter}
1N/Aclasses in order to allow explicit charset objects to be specified in the
1N/Aconstruction of instances of those classes.
1N/A
1N/A<p> Support for new charsets can be made available via the interface defined in
1N/Athe {@link java.nio.charset.spi.CharsetProvider} class in the <tt>{@link
1N/Ajava.nio.charset.spi}</tt> package.
1N/A
1N/A<p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
1N/Aor method in any class or interface in this package will cause a {@link
1N/Ajava.lang.NullPointerException NullPointerException} to be thrown.
1N/A
1N/A
1N/A@since 1.4
1N/A@author Mark Reinhold
1N/A@author JSR-51 Expert Group
1N/A
1N/A</body>
1N/A</html>
1N/A