CharToByteCp1046.java revision 0
1687N/A/*
3909N/A * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved.
1687N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1687N/A *
1687N/A * This code is free software; you can redistribute it and/or modify it
1687N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Sun designates this
1687N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Sun in the LICENSE file that accompanied this code.
1687N/A *
1687N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1687N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1687N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1687N/A * version 2 for more details (a copy is included in the LICENSE file that
1687N/A * accompanied this code).
1687N/A *
1687N/A * You should have received a copy of the GNU General Public License version
1687N/A * 2 along with this work; if not, write to the Free Software Foundation,
1687N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1687N/A *
2362N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2362N/A * CA 95054 USA or visit www.sun.com if you need additional information or
2362N/A * have any questions.
1687N/A */
1687N/A
1687N/Apackage sun.io;
1687N/A
1687N/Aimport sun.nio.cs.ext.IBM1046;
1687N/A
1687N/A/**
1687N/A * Tables and data to convert Unicode to Cp1046
1696N/A *
1687N/A * @author ConverterGenerator tool
1687N/A */
1687N/A
1687N/Apublic class CharToByteCp1046 extends CharToByteSingleByte {
1687N/A
1687N/A private final static IBM1046 nioCoder = new IBM1046();
1687N/A
1687N/A public String getCharacterEncoding() {
1687N/A return "Cp1046";
1687N/A }
1687N/A
1687N/A public CharToByteCp1046() {
1687N/A super.mask1 = 0xFF00;
1687N/A super.mask2 = 0x00FF;
1687N/A super.shift = 8;
1687N/A super.index1 = nioCoder.getEncoderIndex1();
1687N/A super.index2 = nioCoder.getEncoderIndex2();
1687N/A }
1687N/A}
1687N/A