/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class CharsetMapping {
int dbSegSize;
char[] c2b;
char[] c2bIndex;
// Supplementary
char[] b2cSupp;
char[] c2bSupp;
// Composite
public char decodeSingle(int b) {
return b2cSB[b];
}
}
}
}
return UNMAPPABLE_DECODING;
}
// for jis0213 all supplementary characters are in 0x2xxxx range,
// so only the xxxx part is now stored, should actually store the
// codepoint value instead.
if (i >= 0) {
return cc;
}
return null;
}
if (i >= 0) {
return cc;
}
return null;
}
if (index == 0xffff)
return UNMAPPABLE_ENCODING;
}
return UNMAPPABLE_ENCODING;
if (i >= 0)
return UNMAPPABLE_ENCODING;
}
}
return false;
}
if (i >= 0)
return UNMAPPABLE_ENCODING;
}
// init the CharsetMapping object from the .dat binary file
public CharsetMapping run() {
}
});
}
public static class Entry {
}
new Comparator<Entry>() {
}
return this == obj;
}
};
new Comparator<Entry>() {
}
return this == obj;
}
};
new Comparator<Entry>() {
if (v == 0)
return v;
}
return this == obj;
}
};
}
}
}
/*****************************************************************************/
// tags of different charset mapping tables
throws IOException
{
int off = 0;
while (N > 0) {
if (n == -1)
return false;
N = N - n;
off += n;
}
return true;
}
byte[] bb;
private char[] readCharArray() {
// first 2 bytes are the number of "chars" stored in this table
for (int i = 0; i < size; i++) {
}
return cc;
}
void readSINGLEBYTE() {
char[] map = readCharArray();
char c = map[i];
if (c != UNMAPPABLE_DECODING) {
}
}
}
void readINDEXC2B() {
char[] map = readCharArray();
break;
}
}
}
char[] map = readCharArray();
char c = map[i];
if (c != UNMAPPABLE_DECODING) {
//System.out.printf(" DB %x\t%x%n", b, c & 0xffff);
}
}
return map;
}
void readDOUBLEBYTE1() {
}
void readDOUBLEBYTE2() {
}
void readCOMPOSITE() {
char[] map = readCharArray();
b2cComp[i] = m;
c2bComp[i] = m;
}
}
try {
// The first 4 bytes are the size of the total data followed in
// this .dat file.
off = 0;
//System.out.printf("In : Total=%d%n", len);
// Read in all bytes
throw new RuntimeException("Corrupted data file");
switch(type) {
case MAP_INDEXC2B:
readINDEXC2B();
break;
case MAP_SINGLEBYTE:
break;
case MAP_DOUBLEBYTE1:
break;
case MAP_DOUBLEBYTE2:
break;
case MAP_SUPPLEMENT:
b2cSupp = readCharArray();
break;
case MAP_SUPPLEMENT_C2B:
c2bSupp = readCharArray();
break;
case MAP_COMPOSITE:
break;
default:
throw new RuntimeException("Corrupted data file");
}
}
return this;
} catch (IOException x) {
x.printStackTrace();
return null;
}
}
}