blob: 7ff60674ecd6c2770a3ab648638a24d268f594f0 [file] [log] [blame]
Stefan Bodewigc654e042012-04-04 04:51:50 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19package org.apache.commons.compress.utils;
20
21/**
22 * Character encoding names required of every implementation of the Java platform.
23 *
24 * From the Java documentation <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
25 * charsets</a>:
26 * <p>
27 * <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the
28 * release documentation for your implementation to see if any other encodings are supported. Consult the release
29 * documentation for your implementation to see if any other encodings are supported. </cite>
30 * </p>
31 *
Stefan Bodewig45e51c22013-12-22 07:03:43 +000032 * <dl>
33 * <dt><code>US-ASCII</code></dt>
34 * <dd>Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</dd>
35 * <dt><code>ISO-8859-1</code></dt>
36 * <dd>ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</dd>
37 * <dt><code>UTF-8</code></dt>
38 * <dd>Eight-bit Unicode Transformation Format.</dd>
39 * <dt><code>UTF-16BE</code></dt>
40 * <dd>Sixteen-bit Unicode Transformation Format, big-endian byte order.</dd>
41 * <dt><code>UTF-16LE</code></dt>
42 * <dd>Sixteen-bit Unicode Transformation Format, little-endian byte order.</dd>
43 * <dt><code>UTF-16</code></dt>
44 * <dd>Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
45 * accepted on input, big-endian used on output.)</dd>
46 * </dl>
Stefan Bodewigc654e042012-04-04 04:51:50 +000047 *
Stefan Bodewig45e51c22013-12-22 07:03:43 +000048 * <p>This perhaps would best belong in the [lang] project. Even if a similar interface is defined in [lang], it is not
49 * foreseen that [compress] would be made to depend on [lang].</p>
Stefan Bodewigc654e042012-04-04 04:51:50 +000050 *
51 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
52 * @since 1.4
53 * @version $Id$
54 */
55public class CharsetNames {
56 /**
Stefan Bodewig45e51c22013-12-22 07:03:43 +000057 * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.
Stefan Bodewigc654e042012-04-04 04:51:50 +000058 * <p>
59 * Every implementation of the Java platform is required to support this character encoding.
60 * </p>
61 *
62 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
63 */
64 public static final String ISO_8859_1 = "ISO-8859-1";
65
66 /**
67 * <p>
68 * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.
69 * </p>
70 * <p>
71 * Every implementation of the Java platform is required to support this character encoding.
72 * </p>
73 *
74 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
75 */
76 public static final String US_ASCII = "US-ASCII";
77
78 /**
79 * <p>
80 * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark
81 * (either order accepted on input, big-endian used on output)
82 * </p>
83 * <p>
84 * Every implementation of the Java platform is required to support this character encoding.
85 * </p>
86 *
87 * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
88 */
89 public static final String UTF_16 = "UTF-16";
90
91 /**
92 * <p>
93 * Sixteen-bit Unicode Transformation Format, big-endian byte order.
94 * </p>
95 * <p>
96 * Every implementation of the Java platform is required to support this character encoding.
97 * </p>
98 *
99 * @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";
Stefan Bodewig45e51c22013-12-22 07:03:43 +0000126}