Java Doc for NumericCharacterReference.java in  » HTML-Parser » jericho-html » au » id » jericho » lib » html » 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 » HTML Parser » jericho html » au.id.jericho.lib.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   au.id.jericho.lib.html.Segment
      au.id.jericho.lib.html.CharacterReference
         au.id.jericho.lib.html.NumericCharacterReference

NumericCharacterReference
public class NumericCharacterReference extends CharacterReference (Code)
Represents an HTML Numeric Character Reference.

A numeric character reference can be one of two types:

Decimal Character Reference
A numeric character reference specifying the unicode code point in decimal notation.
This is signified by the absence of an 'x' character after the '#', (eg ">").
Hexadecimal Character Reference
A numeric character reference specifying the unicode code point in hexadecimal notation.
This is signified by the presence of an 'x' character after the '#', (eg ">").

Static methods to and strings and single characters can be found in the CharacterReference superclass.

NumericCharacterReference instances are obtained using one of the following methods:


See Also:   CharacterReference
See Also:   CharacterEntityReference




Method Summary
static  CharacterReferenceconstruct(Source source, int begin, Config.UnterminatedCharacterReferenceSettings unterminatedCharacterReferenceSettings)
    
public static  Stringencode(CharSequence unencodedText)
     Encodes the specified text, escaping special characters into numeric character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

This method encodes all character references in decimal format, and is exactly the same as calling NumericCharacterReference.encodeDecimal(CharSequence) .

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using hexadecimal character references only, use the NumericCharacterReference.encodeHexadecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode.

public static  StringencodeDecimal(CharSequence unencodedText)
     Encodes the specified text, escaping special characters into decimal character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using hexadecimal character references only, use the NumericCharacterReference.encodeHexadecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode.

public static  StringencodeHexadecimal(CharSequence unencodedText)
     Encodes the specified text, escaping special characters into hexadecimal character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using decimal character references only, use the NumericCharacterReference.encodeDecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode.

public  StringgetCharacterReferenceString()
     Returns the correct encoded form of this numeric character reference.

The returned string uses the same radix as the original character reference in the source document, i.e.

public static  StringgetCharacterReferenceString(int codePoint)
     Returns the numeric character reference encoded form of the specified unicode code point.
public  StringgetDebugInfo()
    
public  booleanisDecimal()
     Indicates whether this numeric character reference specifies the unicode code point in decimal format.
public  booleanisHexadecimal()
     Indicates whether this numeric character reference specifies the unicode code point in hexadecimal format.



Method Detail
construct
static CharacterReference construct(Source source, int begin, Config.UnterminatedCharacterReferenceSettings unterminatedCharacterReferenceSettings)(Code)



encode
public static String encode(CharSequence unencodedText)(Code)
Encodes the specified text, escaping special characters into numeric character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

This method encodes all character references in decimal format, and is exactly the same as calling NumericCharacterReference.encodeDecimal(CharSequence) .

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using hexadecimal character references only, use the NumericCharacterReference.encodeHexadecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode. the encoded string.
See Also:   NumericCharacterReference.decode(CharSequence)




encodeDecimal
public static String encodeDecimal(CharSequence unencodedText)(Code)
Encodes the specified text, escaping special characters into decimal character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using hexadecimal character references only, use the NumericCharacterReference.encodeHexadecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode. the encoded string.
See Also:   NumericCharacterReference.decode(CharSequence)




encodeHexadecimal
public static String encodeHexadecimal(CharSequence unencodedText)(Code)
Encodes the specified text, escaping special characters into hexadecimal character references.

Each character is encoded only if the NumericCharacterReference.requiresEncoding(char) requiresEncoding(char) method would return true for that character.

To encode text using both character entity references and numeric character references, use the
CharacterReference.encode(CharSequence) method instead.

To encode text using decimal character references only, use the NumericCharacterReference.encodeDecimal(CharSequence) method instead.
Parameters:
  unencodedText - the text to encode. the encoded string.
See Also:   NumericCharacterReference.decode(CharSequence)




getCharacterReferenceString
public String getCharacterReferenceString()(Code)
Returns the correct encoded form of this numeric character reference.

The returned string uses the same radix as the original character reference in the source document, i.e. decimal format if NumericCharacterReference.isDecimal() is true, and hexadecimal format if NumericCharacterReference.isHexadecimal() is true.

Note that the returned string is not necessarily the same as the original source text used to create this object. This library recognises certain invalid forms of character references, as detailed in the NumericCharacterReference.decode(CharSequence) decode(CharSequence) method.

To retrieve the original source text, use the NumericCharacterReference.toString() toString() method instead.

Example:
CharacterReference.parse("&#62").getCharacterReferenceString() returns ">"
the correct encoded form of this numeric character reference.
See Also:   CharacterReference.getCharacterReferenceString(int codePoint)



getCharacterReferenceString
public static String getCharacterReferenceString(int codePoint)(Code)
Returns the numeric character reference encoded form of the specified unicode code point.

This method returns the character reference in decimal format, and is exactly the same as calling NumericCharacterReference.getDecimalCharacterReferenceString(int codePoint) .

To get either the character entity reference or numeric character reference, use the
CharacterReference.getCharacterReferenceString(int codePoint) method instead.

To get the character reference in hexadecimal format, use the NumericCharacterReference.getHexadecimalCharacterReferenceString(int codePoint) method instead.

Examples:
NumericCharacterReference.getCharacterReferenceString(62) returns ">"
NumericCharacterReference.getCharacterReferenceString('>') returns ">"
the numeric character reference encoded form of the specified unicode code point.
See Also:   CharacterReference.getCharacterReferenceString(int codePoint)



getDebugInfo
public String getDebugInfo()(Code)



isDecimal
public boolean isDecimal()(Code)
Indicates whether this numeric character reference specifies the unicode code point in decimal format.

A numeric character reference in decimal format is referred to in this library as a decimal character reference. true if this numeric character reference specifies the unicode code point in decimal format, otherwise false.
See Also:   NumericCharacterReference.isHexadecimal()




isHexadecimal
public boolean isHexadecimal()(Code)
Indicates whether this numeric character reference specifies the unicode code point in hexadecimal format.

A numeric character reference in hexadecimal format is referred to in this library as a hexadecimal character reference. true if this numeric character reference specifies the unicode code point in hexadecimal format, otherwise false.
See Also:   NumericCharacterReference.isDecimal()




Fields inherited from au.id.jericho.lib.html.CharacterReference
final public static int INVALID_CODE_POINT(Code)(Java Doc)
final static int MAX_CODE_POINT(Code)(Java Doc)
static int MAX_ENTITY_REFERENCE_LENGTH(Code)(Java Doc)
int codePoint(Code)(Java Doc)

Methods inherited from au.id.jericho.lib.html.CharacterReference
final static StringBuffer appendDecimalCharacterReferenceString(StringBuffer sb, int codePoint)(Code)(Java Doc)
static StringBuffer appendEncode(StringBuffer sb, CharSequence unencodedText, boolean whiteSpaceFormatting)(Code)(Java Doc)
final static StringBuffer appendHexadecimalCharacterReferenceString(StringBuffer sb, int codePoint)(Code)(Java Doc)
final static StringBuffer appendUnicodeText(StringBuffer sb, int codePoint)(Code)(Java Doc)
public static String decode(CharSequence encodedText)(Code)(Java Doc)
public static String decode(CharSequence encodedText, boolean insideAttributeValue)(Code)(Java Doc)
public static String decodeCollapseWhiteSpace(CharSequence text)(Code)(Java Doc)
static String decodeCollapseWhiteSpace(CharSequence text, boolean convertNonBreakingSpaces)(Code)(Java Doc)
public static String encode(CharSequence unencodedText)(Code)(Java Doc)
public static String encode(char ch)(Code)(Java Doc)
public static String encodeWithWhiteSpaceFormatting(CharSequence unencodedText)(Code)(Java Doc)
static CharacterReference findPreviousOrNext(Source source, int pos, boolean previous)(Code)(Java Doc)
public char getChar()(Code)(Java Doc)
abstract public String getCharacterReferenceString()(Code)(Java Doc)
public static String getCharacterReferenceString(int codePoint)(Code)(Java Doc)
public int getCodePoint()(Code)(Java Doc)
public static int getCodePointFromCharacterReferenceString(CharSequence characterReferenceText)(Code)(Java Doc)
public String getDecimalCharacterReferenceString()(Code)(Java Doc)
public static String getDecimalCharacterReferenceString(int codePoint)(Code)(Java Doc)
public static Writer getEncodingFilterWriter(Writer writer)(Code)(Java Doc)
public String getHexadecimalCharacterReferenceString()(Code)(Java Doc)
public static String getHexadecimalCharacterReferenceString(int codePoint)(Code)(Java Doc)
public String getUnicodeText()(Code)(Java Doc)
public static String getUnicodeText(int codePoint)(Code)(Java Doc)
public boolean isTerminated()(Code)(Java Doc)
public static CharacterReference parse(CharSequence characterReferenceText)(Code)(Java Doc)
public static String reencode(CharSequence encodedText)(Code)(Java Doc)
final public static boolean requiresEncoding(char ch)(Code)(Java Doc)

Fields inherited from au.id.jericho.lib.html.Segment
final int begin(Code)(Java Doc)
List childElements(Code)(Java Doc)
final int end(Code)(Java Doc)
final Source source(Code)(Java Doc)

Methods inherited from au.id.jericho.lib.html.Segment
final static StringBuffer appendCollapseWhiteSpace(StringBuffer sb, CharSequence text)(Code)(Java Doc)
final public char charAt(int index)(Code)(Java Doc)
public int compareTo(Object o)(Code)(Java Doc)
final public boolean encloses(Segment segment)(Code)(Java Doc)
final public boolean encloses(int pos)(Code)(Java Doc)
final public boolean equals(Object object)(Code)(Java Doc)
public String extractText()(Code)(Java Doc)
public String extractText(boolean includeAttributes)(Code)(Java Doc)
public List findAllCharacterReferences()(Code)(Java Doc)
public List findAllElements()(Code)(Java Doc)
public List findAllElements(String name)(Code)(Java Doc)
public List findAllElements(StartTagType startTagType)(Code)(Java Doc)
public List findAllElements(String attributeName, String value, boolean valueCaseSensitive)(Code)(Java Doc)
public List findAllStartTags()(Code)(Java Doc)
public List findAllStartTags(String name)(Code)(Java Doc)
public List findAllStartTags(String attributeName, String value, boolean valueCaseSensitive)(Code)(Java Doc)
public List findAllTags()(Code)(Java Doc)
public List findAllTags(TagType tagType)(Code)(Java Doc)
public List findFormControls()(Code)(Java Doc)
public FormFields findFormFields()(Code)(Java Doc)
final public int getBegin()(Code)(Java Doc)
public List getChildElements()(Code)(Java Doc)
public String getDebugInfo()(Code)(Java Doc)
final public int getEnd()(Code)(Java Doc)
public Renderer getRenderer()(Code)(Java Doc)
public TextExtractor getTextExtractor()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public void ignoreWhenParsing()(Code)(Java Doc)
final public boolean isWhiteSpace()(Code)(Java Doc)
final public static boolean isWhiteSpace(char ch)(Code)(Java Doc)
final public int length()(Code)(Java Doc)
public Attributes parseAttributes()(Code)(Java Doc)
final public CharSequence subSequence(int beginIndex, int endIndex)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.