2362N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2246N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2246N/A * This code is free software; you can redistribute it and/or modify it 2246N/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 2246N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 2246N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2246N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2246N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2246N/A * version 2 for more details (a copy is included in the LICENSE file that 2246N/A * You should have received a copy of the GNU General Public License version 2246N/A * 2 along with this work; if not, write to the Free Software Foundation, 2246N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 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 2246N/A // pattern used by this class to read in mapping table 2246N/A // (1)read in .map to parse all b->c entries 2246N/A for (
int i =
0; i <
0x100; i++) {
2246N/A // (2)now parse the .nr file which includes "b->c" non-roundtrip entries 2246N/A // (3)finally the .c2b file which includes c->b non-roundtrip entries 2246N/A // (4)it's time to generate the source file 2246N/A "" :
"implements HistoricallyNamedCharset")
2246N/A "return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof JIS_X_0201) || (cs instanceof " +
clzName +
"));":
2246N/A "return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof " +
clzName +
"));":
2246N/A " public String historicalName() { return \"" +
hisName +
"\"; }")