749N/A/*
2362N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
749N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
749N/A *
749N/A * This code is free software; you can redistribute it and/or modify it
749N/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
749N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
749N/A *
749N/A * This code is distributed in the hope that it will be useful, but WITHOUT
749N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
749N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
749N/A * version 2 for more details (a copy is included in the LICENSE file that
749N/A * accompanied this code).
749N/A *
749N/A * You should have received a copy of the GNU General Public License version
749N/A * 2 along with this work; if not, write to the Free Software Foundation,
749N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
749N/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.
749N/A */
749N/A
749N/Apackage $PACKAGE$;
749N/A
749N/Aimport java.nio.charset.Charset;
749N/Aimport java.nio.charset.CharsetDecoder;
749N/Aimport java.nio.charset.CharsetEncoder;
749N/Aimport sun.nio.cs.StandardCharsets;
749N/Aimport sun.nio.cs.SingleByte;
749N/Aimport sun.nio.cs.HistoricallyNamedCharset;
749N/Aimport static sun.nio.cs.CharsetMapping.*;
749N/A
749N/Apublic class $NAME_CLZ$ extends Charset implements HistoricallyNamedCharset
749N/A{
749N/A public $NAME_CLZ$() {
749N/A super("$NAME_CS$", $NAME_ALIASES$);
749N/A }
749N/A
749N/A public String historicalName() {
749N/A return "$NAME_HIS$";
749N/A }
749N/A
749N/A public boolean contains(Charset cs) {
749N/A $CONTAINS$;
749N/A }
749N/A
749N/A public CharsetDecoder newDecoder() {
749N/A return new SingleByte.Decoder(this, b2c);
749N/A }
749N/A
749N/A public CharsetEncoder newEncoder() {
749N/A return new SingleByte.Encoder(this, c2b, c2bIndex);
749N/A }
749N/A
749N/A public String getDecoderSingleByteMappings() {
749N/A return b2cTable;
749N/A }
749N/A
749N/A public char[] getEncoderIndex2() {
749N/A return c2b;
749N/A }
749N/A
749N/A public char[] getEncoderIndex1() {
749N/A return c2bIndex;
749N/A }
749N/A
749N/A private final static String b2cTable = $B2CTABLE$
749N/A
749N/A private final static char[] b2c = b2cTable.toCharArray();
749N/A private final static char[] c2b = new char[$C2BLENGTH$];
749N/A private final static char[] c2bIndex = new char[0x100];
749N/A
749N/A static {
749N/A char[] b2cMap = b2c;
749N/A char[] c2bNR = null;
749N/A $NONROUNDTRIP_B2C$
749N/A $NONROUNDTRIP_C2B$
749N/A SingleByte.initC2B(b2cMap, c2bNR, c2b, c2bIndex);
749N/A }
749N/A}