jdk/src/solaris/classes/sun/awt/motif/X11SunUnicode_0.java
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2001-2005 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
package sun.awt.motif;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.nio.charset.Charset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.nio.charset.CharsetEncoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.nio.charset.CharsetDecoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import sun.nio.cs.ext.DoubleByteEncoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
public class X11SunUnicode_0 extends Charset {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    public X11SunUnicode_0 () {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
        super("X11SunUnicode_0", null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    public CharsetEncoder newEncoder() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
        return new Encoder(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    /* Seems like supporting a decoder is required, but we aren't going
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
     * to be publically exposing this class, so no need to waste work
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    public CharsetDecoder newDecoder() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        throw new Error("Decoder is not implemented for X11SunUnicode_0 Charset");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    public boolean contains(Charset cs) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
        return cs instanceof X11SunUnicode_0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    private static class Encoder extends DoubleByteEncoder {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        public Encoder(Charset cs) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
            super(cs, index1, index2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        private final static String innerIndex0=
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            "\u0000\u0120\u0121\u0122\u0000\u0123\u0124\u0125"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            "\u0126\u0127\u0128\u0129\u012A\u012B\u012C\u012D"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            "\u012E\u012F\u0130\u0131\u0132\u0133\u0134\u0135"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            "\u0136\u0137\u0138\u0139\u013A\u013B\u013C\u013D"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            "\u013E\u013F\u0140\u0141\u0142\u0143\u0144\u0145"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
            "\u0146\u0147\u0148\u0149\u014A\u014B\u014C\u014D"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            "\u014E\u014F\u0150\u0151\u0152\u0153\u0154\u0155"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            "\u0156\u0157\u0000\u0000\u0158\u0159\u015A\u015B"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            "\u015C\u015D\u015E\u015F\u0160\u0161\u0162\u0163"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            "\u0164\u0165\u0166\u0167\u0168\u0169\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
            "\u016A\u016B\u016C\u016D\u016E\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            "\u016F\u0170\u0171\u0172\u0173\u0174\u0175\u0176"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
            "\u0177\u0178\u0179\u017A\u017B\u017C\u017D\u017E"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
            "\u017F\u0180\u0181\u0182\u0183\u0184\u0185\u0186"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
            "\u0187\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        private final static short index1[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        private final static String index2[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            innerIndex0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        /* The default implementation creates a decoder and we don't have one */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        public boolean isLegalReplacement(byte[] repl) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
            return true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
}