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