2 *******************************************************************************
\r
3 * Copyright (C) 2006-2007, International Business Machines Corporation and *
\r
4 * others. All Rights Reserved. *
\r
5 *******************************************************************************
\r
7 *******************************************************************************
\r
9 package com.ibm.icu.charset;
\r
11 final class UConverterStaticData { /* +offset: size */
\r
12 int structSize; /* +0: 4 Size of this structure */
\r
14 String name; /* +4: 60 internal name of the converter- invariant chars */
\r
16 int codepage; /* +64: 4 codepage # (now IBM-$codepage) */
\r
18 byte platform; /* +68: 1 platform of the converter (only IBM now) */
\r
19 byte conversionType; /* +69: 1 conversion type */
\r
21 byte minBytesPerChar; /* +70: 1 Minimum # bytes per char in this codepage */
\r
22 byte maxBytesPerChar; /* +71: 1 Maximum # bytes output per UChar in this codepage */
\r
24 byte subChar[/*UCNV_MAX_SUBCHAR_LEN*/]; /* +72: 4 [note: 4 and 8 byte boundary] */
\r
25 byte subCharLen; /* +76: 1 */
\r
27 byte hasToUnicodeFallback; /* +77: 1 UBool needs to be changed to UBool to be consistent across platform */
\r
28 byte hasFromUnicodeFallback; /* +78: 1 */
\r
29 short unicodeMask; /* +79: 1 bit 0: has supplementary bit 1: has single surrogates */
\r
30 byte subChar1; /* +80: 1 single-byte substitution character for IBM MBCS (0 if none) */
\r
31 byte reserved[/*19*/]; /* +81: 19 to round out the structure */
\r
32 /* total size: 100 */
\r
33 public UConverterStaticData()
\r
35 subChar = new byte[UConverterConstants.MAX_SUBCHAR_LEN];
\r
36 reserved = new byte[19];
\r
39 /* public UConverterStaticData(int structSize_, String name_, int codepage_, byte platform_, byte conversionType_, byte minBytesPerChar_, byte maxBytesPerChar_, byte[] subChar_, byte subCharLen_, byte hasToUnicodeFallback_, byte hasFromUnicodeFallback_, short unicodeMask_, byte subChar1_, byte[] reserved_)
\r
41 structSize = structSize_;
\r
43 codepage = codepage_;
\r
44 platform = platform_;
\r
45 conversionType = conversionType_;
\r
46 minBytesPerChar = minBytesPerChar_;
\r
47 maxBytesPerChar = maxBytesPerChar_;
\r
48 subChar = new byte[UConverterConstants.MAX_SUBCHAR_LEN];
\r
49 System.arraycopy(subChar_, 0, subChar, 0, (subChar.length < subChar_.length? subChar.length : subChar_.length));
\r
50 subCharLen = subCharLen_;
\r
51 hasToUnicodeFallback = hasToUnicodeFallback_;
\r
52 hasFromUnicodeFallback = hasFromUnicodeFallback_;
\r
53 unicodeMask = unicodeMask_;
\r
54 subChar1 = subChar1_;
\r
55 reserved = new byte[19];
\r
56 System.arraycopy(reserved_, 0, reserved, 0, (reserved.length < reserved_.length? reserved.length : reserved_.length));
\r
59 public static final int SIZE_OF_UCONVERTER_STATIC_DATA = 100;
\r