Java Doc for ICUResourceBundleReader.java in  » Internationalization-Localization » icu4j » com » ibm » icu » impl » 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.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.impl.ICUResourceBundleReader

ICUResourceBundleReader
final public class ICUResourceBundleReader implements ICUBinary.Authenticate(Code)
This class reads the *.res resource bundle format (For the latest version of the file format documentation see ICU4C's source/common/uresdata.h file.) File format for .res resource bundle files (formatVersion=1.2) An ICU4C resource bundle file (.res) is a binary, memory-mappable file with nested, hierarchical data structures. It physically contains the following: Resource root; -- 32-bit Resource item, root item for this bundle's tree; currently, the root item must be a table or table32 resource item int32_t indexes[indexes[0]]; -- array of indexes for friendly reading and swapping; see URES_INDEX_* above new in formatVersion 1.1 (ICU 2.8) char keys[]; -- characters for key strings (formatVersion 1.0: up to 65k of characters; 1.1: <2G) (minus the space for root and indexes[]), which consist of invariant characters (ASCII/EBCDIC) and are NUL-terminated; padded to multiple of 4 bytes for 4-alignment of the following data data; -- data directly and indirectly indexed by the root item; the structure is determined by walking the tree Each resource bundle item has a 32-bit Resource handle (see typedef above) which contains the item type number in its upper 4 bits (31..28) and either an offset or a direct value in its lower 28 bits (27..0). The order of items is undefined and only determined by walking the tree. Leaves of the tree may be stored first or last or anywhere in between, and it is in theory possible to have unreferenced holes in the file. Direct values: - Empty Unicode strings have an offset value of 0 in the Resource handle itself. - Integer values are 28-bit values stored in the Resource handle itself; the interpretation of unsigned vs. signed integers is up to the application. All other types and values use 28-bit offsets to point to the item's data. The offset is an index to the first 32-bit word of the value, relative to the start of the resource data (i.e., the root item handle is at offset 0). To get byte offsets, the offset is multiplied by 4 (or shifted left by 2 bits). All resource item values are 4-aligned. The structures (memory layouts) for the values for each item type are listed in the table above. Nested, hierarchical structures: ------------- Table items contain key-value pairs where the keys are 16-bit offsets to char * key strings. Key string offsets are also relative to the start of the resource data (of the root handle), i.e., the first string has an offset of 4 (after the 4-byte root handle). The values of these pairs are Resource handles. Array items are simple vectors of Resource handles. An alias item is special (and new in ICU 2.4): -------------- Its memory layout is just like for a UnicodeString, but at runtime it resolves to another resource bundle's item according to the path in the string. This is used to share items across bundles that are in different lookup/fallback chains (e.g., large collation data among zh_TW and zh_HK). This saves space (for large items) and maintenance effort (less duplication of data). -------------------------------------------------------------------------- Resource types: Most resources have their values stored at four-byte offsets from the start of the resource data. These values are at least 4-aligned. Some resource values are stored directly in the offset field of the Resource itself. See UResType in unicode/ures.h for enumeration constants for Resource types. Type Name Memory layout of values (in parentheses: scalar, non-offset values) 0 Unicode String: int32_t length, UChar[length], (UChar)0, (padding) or (empty string ("") if offset==0) 1 Binary: int32_t length, uint8_t[length], (padding) - this value should be 32-aligned - 2 Table: uint16_t count, uint16_t keyStringOffsets[count], (uint16_t padding), Resource[count] 3 Alias: (physically same value layout as string, new in ICU 2.4) 4 Table32: int32_t count, int32_t keyStringOffsets[count], Resource[count] (new in formatVersion 1.1/ICU 2.8) 7 Integer: (28-bit offset is integer value) 8 Array: int32_t count, Resource[count] 14 Integer Vector: int32_t length, int32_t[length] 15 Reserved: This value denotes special purpose resources and is for internal use. Note that there are 3 types with data vector values: - Vectors of 8-bit bytes stored as type Binary. - Vectors of 16-bit words stored as type Unicode String (no value restrictions, all values 0..ffff allowed!). - Vectors of 32-bit words stored as type Integer Vector.




Method Summary
public  byte[]getData()
    
public static  StringgetFullName(String baseName, String localeName)
     Gets the full name of the resource with suffix.
public  booleangetNoFallback()
    
public static  ICUResourceBundleReadergetReader(String baseName, String localeName, ClassLoader root)
    
public  intgetRootResource()
    
public  VersionInfogetVersion()
    
public  booleanisDataVersionAcceptable(byte version)
    



Method Detail
getData
public byte[] getData()(Code)



getFullName
public static String getFullName(String baseName, String localeName)(Code)
Gets the full name of the resource with suffix.



getNoFallback
public boolean getNoFallback()(Code)



getReader
public static ICUResourceBundleReader getReader(String baseName, String localeName, ClassLoader root)(Code)



getRootResource
public int getRootResource()(Code)



getVersion
public VersionInfo getVersion()(Code)



isDataVersionAcceptable
public boolean isDataVersionAcceptable(byte version)(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.