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