< prev index next >

src/java.base/share/classes/java/nio/charset/package-info.java

Print this page


   1 /*
   2  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /**
  27  * Defines charsets, decoders, and encoders, for translating between
  28  * bytes and Unicode characters.
  29  *
  30  * <blockquote><table class="borderless">
  31  *     <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
  32  *  <tr><th style="text-align:left">Class name</th>
  33  *      <th style="text-align:left"><th>DescriptiPath
  34  *   <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
  35  *       <td>A named mapping between characters<br>and bytes</td></tr>
  36  *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>



  37  *       <td>Decodes bytes into characters</td></tr>
  38  *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
  39  *       <td>Encodes characters into bytes</td></tr>
  40  *   <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
  41  *       <td>Describes coder results</td></tr>
  42  *   <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
  43  *       <td>Describes actions to take when<br>coding errors are detected</td></tr>
  44  *
  45  * </table></blockquote>
  46  *
  47  * <p> A <i>charset</i> is named mapping between sequences of
  48  * sixteen-bit Unicode characters and sequences of bytes, in the sense
  49  * defined in <a
  50  * href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>.
  51  * A <i>decoder</i> is an engine which transforms bytes in a specific
  52  * charset into characters, and an <i>encoder</i> is an engine which
  53  * transforms characters into bytes.  Encoders and decoders operate on
  54  * byte and character buffers.  They are collectively referred to as
  55  * <i>coders</i>.
  56  *
  57  * <p> The {@link java.nio.charset.Charset} class defines methods for
  58  * creating coders for a given charset and for retrieving the various
  59  * names associated with a charset.  It also defines static methods
  60  * for testing whether a particular charset is supported, for locating
  61  * charset instances by name, and for constructing a map that contains
  62  * every charset for which support is available in the current Java
  63  * virtual machine.
  64  *
  65  * <p> Most users will not use these classes directly; instead they


   1 /*
   2  * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /**
  27  * Defines charsets, decoders, and encoders, for translating between
  28  * bytes and Unicode characters.
  29  *
  30  * <table class="striped" style="margin-left:2em; text-align:left">
  31  *     <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
  32  *  <thead>
  33  *  <tr><th scope="col">Class name</th>
  34  *      <th scope="col">Description
  35  *  </thead>
  36  *  <tbody>
  37  *   <tr><th scope="row">{@link java.nio.charset.Charset}</th>
  38  *       <td>A named mapping between characters and bytes</td></tr>
  39  *   <tr><th scope="row">{@link java.nio.charset.CharsetDecoder}</th>
  40  *       <td>Decodes bytes into characters</td></tr>
  41  *   <tr><th scope="row">{@link java.nio.charset.CharsetEncoder}</th>
  42  *       <td>Encodes characters into bytes</td></tr>
  43  *   <tr><th scope="row">{@link java.nio.charset.CoderResult}</th>
  44  *       <td>Describes coder results</td></tr>
  45  *   <tr><th scope="row">{@link java.nio.charset.CodingErrorAction}</th>
  46  *       <td>Describes actions to take when coding errors are detected</td></tr>
  47  * </tbody>
  48  * </table>
  49  *
  50  * <p> A <i>charset</i> is named mapping between sequences of
  51  * sixteen-bit Unicode characters and sequences of bytes, in the sense
  52  * defined in <a
  53  * href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC&nbsp;2278</i></a>.
  54  * A <i>decoder</i> is an engine which transforms bytes in a specific
  55  * charset into characters, and an <i>encoder</i> is an engine which
  56  * transforms characters into bytes.  Encoders and decoders operate on
  57  * byte and character buffers.  They are collectively referred to as
  58  * <i>coders</i>.
  59  *
  60  * <p> The {@link java.nio.charset.Charset} class defines methods for
  61  * creating coders for a given charset and for retrieving the various
  62  * names associated with a charset.  It also defines static methods
  63  * for testing whether a particular charset is supported, for locating
  64  * charset instances by name, and for constructing a map that contains
  65  * every charset for which support is available in the current Java
  66  * virtual machine.
  67  *
  68  * <p> Most users will not use these classes directly; instead they


< prev index next >