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 */ 017package org.apache.wicket.util.crypt; 018 019/** 020 * Character encoding names required of every implementation of the Java platform. 021 * 022 * From the Java documentation <a 023 * href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 024 * charsets</a>: 025 * <p> 026 * <cite>Every implementation of the Java platform is required to support the following character 027 * encodings. Consult the release documentation for your implementation to see if any other 028 * encodings are supported. Consult the release documentation for your implementation to see if any 029 * other encodings are supported. </cite> 030 * </p> 031 * 032 * <ul> 033 * <li><code>US-ASCII</code><br/> 034 * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</li> 035 * <li><code>ISO-8859-1</code><br/> 036 * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</li> 037 * <li><code>UTF-8</code><br/> 038 * Eight-bit Unicode Transformation Format.</li> 039 * <li><code>UTF-16BE</code><br/> 040 * Sixteen-bit Unicode Transformation Format, big-endian byte order.</li> 041 * <li><code>UTF-16LE</code><br/> 042 * Sixteen-bit Unicode Transformation Format, little-endian byte order.</li> 043 * <li><code>UTF-16</code><br/> 044 * Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order 045 * mark (either order accepted on input, big-endian used on output.)</li> 046 * </ul> 047 * 048 * This perhaps would best belong in the [lang] project. Even if a similar interface is defined in 049 * [lang], it is not forseen that [codec] would be made to depend on [lang]. 050 * 051 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 052 * charsets</a> 053 * @author Apache Software Foundation 054 * @since 1.4 055 * @version $Id$ 056 */ 057public class CharEncoding 058{ 059 /** 060 * CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1. </p> 061 * <p> 062 * Every implementation of the Java platform is required to support this character encoding. 063 * </p> 064 * 065 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 066 * charsets</a> 067 */ 068 public static final String ISO_8859_1 = "ISO-8859-1"; 069 070 /** 071 * <p> 072 * Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode 073 * character set. 074 * </p> 075 * <p> 076 * Every implementation of the Java platform is required to support this character encoding. 077 * </p> 078 * 079 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 080 * charsets</a> 081 */ 082 public static final String US_ASCII = "US-ASCII"; 083 084 /** 085 * <p> 086 * Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial 087 * byte-order mark (either order accepted on input, big-endian used on output) 088 * </p> 089 * <p> 090 * Every implementation of the Java platform is required to support this character encoding. 091 * </p> 092 * 093 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 094 * charsets</a> 095 */ 096 public static final String UTF_16 = "UTF-16"; 097 098 /** 099 * <p> 100 * Sixteen-bit Unicode Transformation Format, big-endian byte order. 101 * </p> 102 * <p> 103 * Every implementation of the Java platform is required to support this character encoding. 104 * </p> 105 * 106 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 107 * charsets</a> 108 */ 109 public static final String UTF_16BE = "UTF-16BE"; 110 111 /** 112 * <p> 113 * Sixteen-bit Unicode Transformation Format, little-endian byte order. 114 * </p> 115 * <p> 116 * Every implementation of the Java platform is required to support this character encoding. 117 * </p> 118 * 119 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 120 * charsets</a> 121 */ 122 public static final String UTF_16LE = "UTF-16LE"; 123 124 /** 125 * <p> 126 * Eight-bit Unicode Transformation Format. 127 * </p> 128 * <p> 129 * Every implementation of the Java platform is required to support this character encoding. 130 * </p> 131 * 132 * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html">Standard 133 * charsets</a> 134 */ 135 public static final String UTF_8 = "UTF-8"; 136}