    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *   http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 *
    017 */
    018
    019package org.apache.commons.compress.utils;
    020
    021/**
    022 * Character encoding names required of every implementation of the Java platform.
    023 *
    024 * From the Java documentation <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
    025 * charsets</a>:
    026 * <p>
    027 * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the
    028 * release documentation for your implementation to see if any other encodings are supported. Consult the release
    029 * documentation for your implementation to see if any other encodings are supported. </cite>
    030 * </p>
    031 *
    032 * <dl>
    033 * <dt><code>US-ASCII</code></dt>
    034 * <dd>Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</dd>
    035 * <dt><code>ISO-8859-1</code></dt>
    036 * <dd>ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</dd>
    037 * <dt><code>UTF-8</code></dt>
    038 * <dd>Eight-bit Unicode Transformation Format.</dd>
    039 * <dt><code>UTF-16BE</code></dt>
    040 * <dd>Sixteen-bit Unicode Transformation Format, big-endian byte order.</dd>
    041 * <dt><code>UTF-16LE</code></dt>
    042 * <dd>Sixteen-bit Unicode Transformation Format, little-endian byte order.</dd>
    043 * <dt><code>UTF-16</code></dt>
    044 * <dd>Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
    045 * accepted on input, big-endian used on output.)</dd>
    046 * </dl>
    047 *
    048 * <p>This perhaps would best belong in the [lang] project. Even if a similar interface is defined in [lang], it is not
    049 * foreseen that [compress] would be made to depend on [lang].</p>
    050 *
    051 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    052 * @since 1.4
    053 * @version $Id$
    054 */
    055public class CharsetNames {
    056    /**
    057     * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.
    058     * <p>
    059     * Every implementation of the Java platform is required to support this character encoding.
    060     * </p>
    061     *
    062     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    063     */
    064    public static final String ISO_8859_1 = "ISO-8859-1";
    065
    066    /**
    067     * <p>
    068     * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.
    069     * </p>
    070     * <p>
    071     * Every implementation of the Java platform is required to support this character encoding.
    072     * </p>
    073     *
    074     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    075     */
    076    public static final String US_ASCII = "US-ASCII";
    077
    078    /**
    079     * <p>
    080     * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark
    081     * (either order accepted on input, big-endian used on output)
    082     * </p>
    083     * <p>
    084     * Every implementation of the Java platform is required to support this character encoding.
    085     * </p>
    086     *
    087     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    088     */
    089    public static final String UTF_16 = "UTF-16";
    090
    091    /**
    092     * <p>
    093     * Sixteen-bit Unicode Transformation Format, big-endian byte order.
    094     * </p>
    095     * <p>
    096     * Every implementation of the Java platform is required to support this character encoding.
    097     * </p>
    098     *
    099     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    100     */
    101    public static final String UTF_16BE = "UTF-16BE";
    102
    103    /**
    104     * <p>
    105     * Sixteen-bit Unicode Transformation Format, little-endian byte order.
    106     * </p>
    107     * <p>
    108     * Every implementation of the Java platform is required to support this character encoding.
    109     * </p>
    110     *
    111     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    112     */
    113    public static final String UTF_16LE = "UTF-16LE";
    114
    115    /**
    116     * <p>
    117     * Eight-bit Unicode Transformation Format.
    118     * </p>
    119     * <p>
    120     * Every implementation of the Java platform is required to support this character encoding.
    121     * </p>
    122     *
    123     * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
    124     */
    125    public static final String UTF_8 = "UTF-8";
    126}