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