Java Doc for XMLChar.java in  » 6.0-JDK-Modules » sjsxp » com » sun » xml » stream » xerces » util » 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 » 6.0 JDK Modules » sjsxp » com.sun.xml.stream.xerces.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.stream.xerces.util.XMLChar

XMLChar
public class XMLChar (Code)
This class defines the basic XML character properties. The data in this class can be used to verify that a character is a valid XML character or if the character is a space, name start, or name character.

A series of convenience methods are supplied to ease the burden of the developer. Because inlining the checks can improve per character performance, the tables of character properties are public. Using the character as an index into the CHARS array and applying the appropriate mask flag (e.g. MASK_VALID), yields the same results as calling the convenience methods. There is one exception: check the comments for the isValid method for details.
author:
   Glenn Marcy, IBM
author:
   Andy Clark, IBM
author:
   Eric Ye, IBM
author:
   Arnaud Le Hors, IBM
author:
   Michael Glavassevich, IBM
author:
   Rahul Srivastava, Sun Microsystems Inc.
version:
   $Id: XMLChar.java,v 1.2 2006/04/01 06:01:40 jeffsuttor Exp $



Field Summary
final public static  intMASK_CONTENT
     Content character mask.
final public static  intMASK_NAME
     Name character mask.
final public static  intMASK_NAME_START
     Name start character mask.
final public static  intMASK_NCNAME
     NCName character mask.
final public static  intMASK_NCNAME_START
     NCName start character mask.
final public static  intMASK_PUBID
     Pubid character mask.
final public static  intMASK_SPACE
     Space character mask.
final public static  intMASK_VALID
     Valid character mask.


Method Summary
public static  charhighSurrogate(int c)
    
public static  booleanisContent(int c)
     Returns true if the specified character can be considered content.
public static  booleanisHighSurrogate(int c)
    
public static  booleanisInvalid(int c)
     Returns true if the specified character is invalid.
public static  booleanisLowSurrogate(int c)
    
public static  booleanisMarkup(int c)
     Returns true if the specified character can be considered markup.
public static  booleanisNCName(int c)
     Returns true if the specified character is a valid NCName character as defined by production [5] in Namespaces in XML recommendation.
public static  booleanisNCNameStart(int c)
     Returns true if the specified character is a valid NCName start character as defined by production [4] in Namespaces in XML recommendation.
public static  booleanisName(int c)
     Returns true if the specified character is a valid name character as defined by production [4] in the XML 1.0 specification.
public static  booleanisNameStart(int c)
     Returns true if the specified character is a valid name start character as defined by production [5] in the XML 1.0 specification.
public static  booleanisPubid(int c)
     Returns true if the specified character is a valid Pubid character as defined by production [13] in the XML 1.0 specification.
public static  booleanisSpace(int c)
     Returns true if the specified character is a space character as defined by production [3] in the XML 1.0 specification.
public static  booleanisSupplemental(int c)
     Returns true if the specified character is a supplemental character.
public static  booleanisValid(int c)
     Returns true if the specified character is valid.
public static  booleanisValidIANAEncoding(String ianaEncoding)
     Returns true if the encoding name is a valid IANA encoding.
public static  booleanisValidJavaEncoding(String javaEncoding)
     Returns true if the encoding name is a valid Java encoding.
public static  booleanisValidNCName(String ncName)
    
public static  booleanisValidName(String name)
    
public static  booleanisValidNmtoken(String nmtoken)
    
public static  charlowSurrogate(int c)
    
public static  intsupplemental(char h, char l)
     Returns true the supplemental character corresponding to the given surrogates.

Field Detail
MASK_CONTENT
final public static int MASK_CONTENT(Code)
Content character mask. Special characters are those that can be considered the start of markup, such as '<' and '&'. The various newline characters are considered special as well. All other valid XML characters can be considered content.

This is an optimization for the inner loop of character scanning.




MASK_NAME
final public static int MASK_NAME(Code)
Name character mask.



MASK_NAME_START
final public static int MASK_NAME_START(Code)
Name start character mask.



MASK_NCNAME
final public static int MASK_NCNAME(Code)
NCName character mask.



MASK_NCNAME_START
final public static int MASK_NCNAME_START(Code)
NCName start character mask.



MASK_PUBID
final public static int MASK_PUBID(Code)
Pubid character mask.



MASK_SPACE
final public static int MASK_SPACE(Code)
Space character mask.



MASK_VALID
final public static int MASK_VALID(Code)
Valid character mask.





Method Detail
highSurrogate
public static char highSurrogate(int c)(Code)
Returns the high surrogate of a supplemental character
Parameters:
  c - The supplemental character to "split".



isContent
public static boolean isContent(int c)(Code)
Returns true if the specified character can be considered content.
Parameters:
  c - The character to check.



isHighSurrogate
public static boolean isHighSurrogate(int c)(Code)
Returns whether the given character is a high surrogate
Parameters:
  c - The character to check.



isInvalid
public static boolean isInvalid(int c)(Code)
Returns true if the specified character is invalid.
Parameters:
  c - The character to check.



isLowSurrogate
public static boolean isLowSurrogate(int c)(Code)
Returns whether the given character is a low surrogate
Parameters:
  c - The character to check.



isMarkup
public static boolean isMarkup(int c)(Code)
Returns true if the specified character can be considered markup. Markup characters include '<', '&', and '%'.
Parameters:
  c - The character to check.



isNCName
public static boolean isNCName(int c)(Code)
Returns true if the specified character is a valid NCName character as defined by production [5] in Namespaces in XML recommendation.
Parameters:
  c - The character to check.



isNCNameStart
public static boolean isNCNameStart(int c)(Code)
Returns true if the specified character is a valid NCName start character as defined by production [4] in Namespaces in XML recommendation.
Parameters:
  c - The character to check.



isName
public static boolean isName(int c)(Code)
Returns true if the specified character is a valid name character as defined by production [4] in the XML 1.0 specification.
Parameters:
  c - The character to check.



isNameStart
public static boolean isNameStart(int c)(Code)
Returns true if the specified character is a valid name start character as defined by production [5] in the XML 1.0 specification.
Parameters:
  c - The character to check.



isPubid
public static boolean isPubid(int c)(Code)
Returns true if the specified character is a valid Pubid character as defined by production [13] in the XML 1.0 specification.
Parameters:
  c - The character to check.



isSpace
public static boolean isSpace(int c)(Code)
Returns true if the specified character is a space character as defined by production [3] in the XML 1.0 specification.
Parameters:
  c - The character to check.



isSupplemental
public static boolean isSupplemental(int c)(Code)
Returns true if the specified character is a supplemental character.
Parameters:
  c - The character to check.



isValid
public static boolean isValid(int c)(Code)
Returns true if the specified character is valid. This method also checks the surrogate character range from 0x10000 to 0x10FFFF.

If the program chooses to apply the mask directly to the CHARS array, then they are responsible for checking the surrogate character range.
Parameters:
  c - The character to check.




isValidIANAEncoding
public static boolean isValidIANAEncoding(String ianaEncoding)(Code)
Returns true if the encoding name is a valid IANA encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an IANA encoding name.
Parameters:
  ianaEncoding - The IANA encoding name.



isValidJavaEncoding
public static boolean isValidJavaEncoding(String javaEncoding)(Code)
Returns true if the encoding name is a valid Java encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an Java encoding name.
Parameters:
  javaEncoding - The Java encoding name.



isValidNCName
public static boolean isValidNCName(String ncName)(Code)
Check to see if a string is a valid NCName according to [4] from the XML Namespaces 1.0 Recommendation
Parameters:
  name - string to check true if name is a valid NCName



isValidName
public static boolean isValidName(String name)(Code)
Check to see if a string is a valid Name according to [5] in the XML 1.0 Recommendation
Parameters:
  name - string to check true if name is a valid Name



isValidNmtoken
public static boolean isValidNmtoken(String nmtoken)(Code)
Check to see if a string is a valid Nmtoken according to [7] in the XML 1.0 Recommendation
Parameters:
  nmtoken - string to check true if nmtoken is a valid Nmtoken



lowSurrogate
public static char lowSurrogate(int c)(Code)
Returns the low surrogate of a supplemental character
Parameters:
  c - The supplemental character to "split".



supplemental
public static int supplemental(char h, char l)(Code)
Returns true the supplemental character corresponding to the given surrogates.
Parameters:
  h - The high surrogate.
Parameters:
  l - The low surrogate.



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.