1245N/A/*
2362N/A * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
1245N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1245N/A *
1245N/A * This code is free software; you can redistribute it and/or modify it
1245N/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
1245N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
1245N/A *
1245N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1245N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1245N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1245N/A * version 2 for more details (a copy is included in the LICENSE file that
1245N/A * accompanied this code).
1245N/A *
1245N/A * You should have received a copy of the GNU General Public License version
1245N/A * 2 along with this work; if not, write to the Free Software Foundation,
1245N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1245N/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.
1245N/A */
1245N/A
1245N/A// -- This file was mechanically generated: Do not edit! -- //
1245N/A
1245N/Apackage $PACKAGE$;
1245N/A
1245N/Aimport java.nio.charset.Charset;
1245N/Aimport java.nio.charset.CharsetDecoder;
1245N/Aimport java.nio.charset.CharsetEncoder;
1245N/Aimport java.util.Arrays;
1245N/Aimport sun.nio.cs.HistoricallyNamedCharset;
1245N/Aimport sun.nio.cs.ext.DoubleByte;
1245N/A
1245N/Apublic class $NAME_CLZ$ extends Charset
1245N/A $IMPLEMENTS$
1245N/A{
1245N/A public $NAME_CLZ$() {
1245N/A super("$NAME_CS$", $NAME_ALIASES$);
1245N/A }
1245N/A
1245N/A $HISTORICALNAME$
1245N/A
1245N/A public boolean contains(Charset cs) {
1245N/A $CONTAINS$
1245N/A }
1245N/A
1245N/A public CharsetDecoder newDecoder() {
1245N/A initb2c();
1245N/A return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$);
1245N/A }
1245N/A
1245N/A public CharsetEncoder newEncoder() {
1245N/A initc2b();
1245N/A return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
1245N/A }
1245N/A
1245N/A $B2C$
1245N/A static char[][] b2c = new char[b2cStr.length][];
1245N/A static char[] b2cSB;
1245N/A private static volatile boolean b2cInitialized = false;
1245N/A
1245N/A static void initb2c() {
1245N/A if (b2cInitialized)
1245N/A return;
1245N/A synchronized (b2c) {
1245N/A if (b2cInitialized)
1245N/A return;
1245N/A for (int i = 0; i < b2cStr.length; i++) {
1245N/A if (b2cStr[i] == null)
1245N/A b2c[i] = DoubleByte.B2C_UNMAPPABLE;
1245N/A else
1245N/A b2c[i] = b2cStr[i].toCharArray();
1245N/A }
1245N/A b2cSB = b2cSBStr.toCharArray();
1245N/A b2cInitialized = true;
1245N/A }
1245N/A }
1245N/A
1245N/A static char[] c2b = new char[$C2BLENGTH$];
1245N/A static char[] c2bIndex = new char[0x100];
1245N/A private static volatile boolean c2bInitialized = false;
1245N/A
1245N/A static void initc2b() {
1245N/A if (c2bInitialized)
1245N/A return;
1245N/A synchronized (c2b) {
1245N/A if (c2bInitialized)
1245N/A return;
1245N/A $NONROUNDTRIP_B2C$
1245N/A $NONROUNDTRIP_C2B$
1245N/A DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
1245N/A $B2MIN$, $B2MAX$,
1245N/A c2b, c2bIndex);
1245N/A c2bInitialized = true;
1245N/A }
1245N/A }
1245N/A}