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


java.lang.Object
   com.ibm.icu.dev.test.UTF16Util

UTF16Util
public class UTF16Util (Code)
Utility class for supplementary code point support. This one is written purely for updating Normalization sample from the unicode.org site. If you want the real thing, use UTF16 class from ICU4J
author:
   Vladimir Weinstein, Markus Scherer


Field Summary
final public static  intLEAD_SURROGATE_MAX_VALUE
    
final public static  intLEAD_SURROGATE_MIN_VALUE
    
final public static  intSUPPLEMENTARY_MIN_VALUE
    
final public static  intTRAIL_SURROGATE_MAX_VALUE
    
final public static  intTRAIL_SURROGATE_MIN_VALUE
    
final static  intsuppOffset
    


Method Summary
final public static  voidappendCodePoint(StringBuffer buffer, int ch)
     Method appendCodePoint.
public static  intcharAt(char source, int start, int limit, int offset16)
     Extract a single UTF-32 value from a substring. Used when iterating forwards or backwards (with UTF16.getCharCount(), as well as random access.
final public static  intcodePointLength(int c)
     Method codePointLength.
final public static  intcountCodePoint(String source)
     Method countCodePoint.
final public static  intcountCodePoint(StringBuffer source)
     Method countCodePoint.
public static  intgetCharCount(int char32)
     Determines how many chars this char32 requires. If a validity check is required, use isLegal() on char32 before calling.
Parameters:
  char32 - the input codepoint.
public static  intgetRawSupplementary(char lead, char trail)
    
final public static  voidinsertCodePoint(StringBuffer buffer, int i, int ch)
     Method insertCodePoint.
public static  booleanisLeadSurrogate(char char16)
     Determines whether the character is a lead surrogate.
Parameters:
  char16 - the input character.
public static  booleanisSurrogate(char char16)
     Determines whether the code value is a surrogate.
Parameters:
  char16 - the input character.
public static  booleanisTrailSurrogate(char char16)
     Determines whether the character is a trail surrogate.
Parameters:
  char16 - the input character.
final public static  intnextCodePoint(String s, int i)
     Method nextCodePoint.
final public static  intnextCodePoint(StringBuffer s, int i)
     Method nextCodePoint.
final public static  intprevCodePoint(String s, int i)
     Method prevCodePoint.
final public static  intprevCodePoint(StringBuffer s, int i)
     Method prevCodePoint.
final public static  intsetCodePointAt(StringBuffer buffer, int i, int ch)
     Method setCodePointAt.

Field Detail
LEAD_SURROGATE_MAX_VALUE
final public static int LEAD_SURROGATE_MAX_VALUE(Code)
Lead surrogate maximum value



LEAD_SURROGATE_MIN_VALUE
final public static int LEAD_SURROGATE_MIN_VALUE(Code)
Lead surrogate minimum value



SUPPLEMENTARY_MIN_VALUE
final public static int SUPPLEMENTARY_MIN_VALUE(Code)
The minimum value for Supplementary code points



TRAIL_SURROGATE_MAX_VALUE
final public static int TRAIL_SURROGATE_MAX_VALUE(Code)
Trail surrogate maximum value



TRAIL_SURROGATE_MIN_VALUE
final public static int TRAIL_SURROGATE_MIN_VALUE(Code)
Trail surrogate minimum value



suppOffset
final static int suppOffset(Code)





Method Detail
appendCodePoint
final public static void appendCodePoint(StringBuffer buffer, int ch)(Code)
Method appendCodePoint. Appends a code point to a StringBuffer
Parameters:
  buffer - StringBuffer in question
Parameters:
  ch - code point to append



charAt
public static int charAt(char source, int start, int limit, int offset16)(Code)
Extract a single UTF-32 value from a substring. Used when iterating forwards or backwards (with UTF16.getCharCount(), as well as random access. If a validity check is required, use UCharacter.isLegal() on the return value. If the char retrieved is part of a surrogate pair, its supplementary character will be returned. If a complete supplementary character is not found the incomplete character will be returned
Parameters:
  source - array of UTF-16 chars
Parameters:
  start - offset to substring in the source array for analyzing
Parameters:
  limit - offset to substring in the source array for analyzing
Parameters:
  offset16 - UTF-16 offset relative to start UTF-32 value for the UTF-32 value that contains the char atoffset16. The boundaries of that codepoint are the same as inbounds32().
exception:
  IndexOutOfBoundsException - thrown if offset16 is not within the range of start and limit.



codePointLength
final public static int codePointLength(int c)(Code)
Method codePointLength. Returns the length in UTF-16 code units of a given code point
Parameters:
  c - code point in question int length in UTF-16 code units. Can be 1 or 2



countCodePoint
final public static int countCodePoint(String source)(Code)
Method countCodePoint. Counts the UTF-32 code points in a UTF-16 encoded string.
Parameters:
  source - String in question. int number of code points in this string



countCodePoint
final public static int countCodePoint(StringBuffer source)(Code)
Method countCodePoint. Counts the UTF-32 code points in a UTF-16 encoded string.
Parameters:
  source - StringBuffer in question. int number of code points in this string



getCharCount
public static int getCharCount(int char32)(Code)
Determines how many chars this char32 requires. If a validity check is required, use isLegal() on char32 before calling.
Parameters:
  char32 - the input codepoint. 2 if is in supplementary space, otherwise 1.



getRawSupplementary
public static int getRawSupplementary(char lead, char trail)(Code)
Forms a supplementary code point from the argument character
Note this is for internal use hence no checks for the validity of the surrogate characters are done
Parameters:
  lead - lead surrogate character
Parameters:
  trail - trailing surrogate character code point of the supplementary character



insertCodePoint
final public static void insertCodePoint(StringBuffer buffer, int i, int ch)(Code)
Method insertCodePoint. Inserts a code point in a StringBuffer
Parameters:
  buffer - StringBuffer in question
Parameters:
  i - index at which we want code point to be inserted
Parameters:
  ch - code point to be inserted



isLeadSurrogate
public static boolean isLeadSurrogate(char char16)(Code)
Determines whether the character is a lead surrogate.
Parameters:
  char16 - the input character. true iff the input character is a lead surrogate



isSurrogate
public static boolean isSurrogate(char char16)(Code)
Determines whether the code value is a surrogate.
Parameters:
  char16 - the input character. true iff the input character is a surrogate.



isTrailSurrogate
public static boolean isTrailSurrogate(char char16)(Code)
Determines whether the character is a trail surrogate.
Parameters:
  char16 - the input character. true iff the input character is a trail surrogate.



nextCodePoint
final public static int nextCodePoint(String s, int i)(Code)
Method nextCodePoint. Returns the next code point in a string.
Parameters:
  s - String in question
Parameters:
  i - index from which we want a code point int codepoint at index i



nextCodePoint
final public static int nextCodePoint(StringBuffer s, int i)(Code)
Method nextCodePoint. Returns the next code point in a string.
Parameters:
  s - StringBuffer in question
Parameters:
  i - index from which we want a code point int codepoint at index i



prevCodePoint
final public static int prevCodePoint(String s, int i)(Code)
Method prevCodePoint. Gets the code point preceding index i (predecrement).
Parameters:
  s - String in question
Parameters:
  i - index in string int codepoint at index --i



prevCodePoint
final public static int prevCodePoint(StringBuffer s, int i)(Code)
Method prevCodePoint. Gets the code point preceding index i (predecrement).
Parameters:
  s - StringBuffer in question
Parameters:
  i - index in string int codepoint at index --i



setCodePointAt
final public static int setCodePointAt(StringBuffer buffer, int i, int ch)(Code)
Method setCodePointAt. Changes a code point at a given index. Can change the length of the string.
Parameters:
  buffer - StringBuffer in question
Parameters:
  i - index at which we want to change the contents
Parameters:
  ch - replacement code point int difference in resulting StringBuffer length



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.