Java Doc for UConverterDataReader.java in  » Internationalization-Localization » icu4j » com » ibm » icu » charset » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.charset 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.charset.UConverterDataReader

UConverterDataReader
final class UConverterDataReader implements ICUBinary.Authenticate(Code)
ucnvmbcs.h ICU conversion (.cnv) data file structure, following the usual UDataInfo header. Format version: 6.2 struct UConverterStaticData -- struct containing the converter name, IBM CCSID, min/max bytes per character, etc. see ucnv_bld.h -------------------- The static data is followed by conversionType-specific data structures. At the moment, there are only variations of MBCS converters. They all have the same toUnicode structures, while the fromUnicode structures for SBCS differ from those for other MBCS-style converters. _MBCSHeader.version 4.2 adds an optional conversion extension data structure. If it is present, then an ICU version reading header versions 4.0 or 4.1 will be able to use the base table and ignore the extension. The unicodeMask in the static data is part of the base table data structure. Especially, the UCNV_HAS_SUPPLEMENTARY flag determines the length of the fromUnicode stage 1 array. The static data unicodeMask refers only to the base table's properties if a base table is included. In an extension-only file, the static data unicodeMask is 0. The extension data indexes have a separate field with the unicodeMask flags. MBCS-style data structure following the static data. Offsets are counted in bytes from the beginning of the MBCS header structure. Details about usage in comments in ucnvmbcs.c. struct _MBCSHeader (see the definition in this header file below) contains 32-bit fields as follows: 8 values: 0 uint8_t[4] MBCS version in UVersionInfo format (currently 4.2.0.0) 1 uint32_t countStates 2 uint32_t countToUFallbacks 3 uint32_t offsetToUCodeUnits 4 uint32_t offsetFromUTable 5 uint32_t offsetFromUBytes 6 uint32_t flags, bits: 31.. 8 offsetExtension -- _MBCSHeader.version 4.2 (ICU 2.8) and higher 0 for older versions and if there is not extension structure 7.. 0 outputType 7 uint32_t fromUBytesLength -- _MBCSHeader.version 4.1 (ICU 2.4) and higher counts bytes in fromUBytes[] if(outputType==MBCS_OUTPUT_EXT_ONLY) { -- base table name for extension-only table char baseTableName[variable]; -- with NUL plus padding for 4-alignment -- all _MBCSHeader fields except for version and flags are 0 } else { -- normal base table with optional extension int32_t stateTable[countStates][256]; struct _MBCSToUFallback { (fallbacks are sorted by offset) uint32_t offset; UChar32 codePoint; } toUFallbacks[countToUFallbacks]; uint16_t unicodeCodeUnits[(offsetFromUTable-offsetToUCodeUnits)/2]; (padded to an even number of units) -- stage 1 tables if(staticData.unicodeMask&UCNV_HAS_SUPPLEMENTARY) { -- stage 1 table for all of Unicode uint16_t fromUTable[0x440]; (32-bit-aligned) } else { -- BMP-only tables have a smaller stage 1 table uint16_t fromUTable[0x40]; (32-bit-aligned) } -- stage 2 tables length determined by top of stage 1 and bottom of stage 3 tables if(outputType==MBCS_OUTPUT_1) { -- SBCS: pure indexes uint16_t stage 2 indexes[?]; } else { -- DBCS, MBCS, EBCDIC_STATEFUL, ...: roundtrip flags and indexes uint32_t stage 2 flags and indexes[?]; } -- stage 3 tables with byte results if(outputType==MBCS_OUTPUT_1) { -- SBCS: each 16-bit result contains flags and the result byte, see ucnvmbcs.c uint16_t fromUBytes[fromUBytesLength/2]; } else { -- DBCS, MBCS, EBCDIC_STATEFUL, ... 2/3/4 bytes result, see ucnvmbcs.c uint8_t fromUBytes[fromUBytesLength]; or uint16_t fromUBytes[fromUBytesLength/2]; or uint32_t fromUBytes[fromUBytesLength/4]; } } -- extension table, details see ucnv_ext.h int32_t indexes[>=32]; ...



Constructor Summary
protected  UConverterDataReader(InputStream inputStream)
    

Method Summary
 byte[]getDataFormatVersion()
    
 byte[]getUnicodeVersion()
    
public  booleanisDataVersionAcceptable(byte version)
    
protected  StringreadBaseTableName()
    
protected  ByteBufferreadExtIndexes(int skip)
    
protected  byte[]readExtTables(int n)
    
protected  voidreadMBCSHeader(CharsetMBCS.MBCSHeader h)
    
protected  voidreadMBCSTable(int[][] stateTableArray, CharsetMBCS.MBCSToUFallback[] toUFallbacksArray, char[] unicodeCodeUnitsArray, char[] fromUnicodeTableArray, byte[] fromUnicodeBytesArray)
    
protected  voidreadStaticData(UConverterStaticData sd)
    


Constructor Detail
UConverterDataReader
protected UConverterDataReader(InputStream inputStream) throws IOException(Code)

Protected constructor.


Parameters:
  inputStream - ICU uprop.dat file input stream
exception:
  IOException - throw if data file fails authentication




Method Detail
getDataFormatVersion
byte[] getDataFormatVersion()(Code)



getUnicodeVersion
byte[] getUnicodeVersion()(Code)



isDataVersionAcceptable
public boolean isDataVersionAcceptable(byte version)(Code)
Inherited method



readBaseTableName
protected String readBaseTableName() throws IOException(Code)



readExtIndexes
protected ByteBuffer readExtIndexes(int skip) throws IOException(Code)



readExtTables
protected byte[] readExtTables(int n) throws IOException(Code)



readMBCSHeader
protected void readMBCSHeader(CharsetMBCS.MBCSHeader h) throws IOException(Code)



readMBCSTable
protected void readMBCSTable(int[][] stateTableArray, CharsetMBCS.MBCSToUFallback[] toUFallbacksArray, char[] unicodeCodeUnitsArray, char[] fromUnicodeTableArray, byte[] fromUnicodeBytesArray) throws IOException(Code)



readStaticData
protected void readStaticData(UConverterStaticData sd) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.