Java Doc for XMLScanner.java in  » Graphic-Library » batik » org » apache » batik » xml » 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 » Graphic Library » batik » org.apache.batik.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.batik.xml.XMLScanner

XMLScanner
public class XMLScanner implements Localizable(Code)
This class represents a scanner for XML documents.
author:
   Stephane Hillion
version:
   $Id: XMLScanner.java 489226 2006-12-21 00:05:36Z cam $


Field Summary
final public static  intATTLIST_CONTEXT
     The ATTLIST context.
final public static  intATTRIBUTE_VALUE_CONTEXT
     The attribute value context.
final protected static  StringBUNDLE_CLASSNAME
     The default resource bundle base name.
final public static  intCDATA_SECTION_CONTEXT
     The CDATA section context.
final public static  intCONTENT_CONTEXT
     The content context.
final public static  intDOCTYPE_CONTEXT
     The doctype context.
final public static  intDOCUMENT_START_CONTEXT
     The document start context.
final public static  intDTD_DECLARATIONS_CONTEXT
     The DTD declarations context.
final public static  intELEMENT_DECLARATION_CONTEXT
     The element declaration context.
final public static  intEND_TAG_CONTEXT
     The end tag context.
final public static  intENTITY_CONTEXT
     The entity context.
final public static  intENTITY_VALUE_CONTEXT
     The entity value context.
final public static  intENUMERATION_CONTEXT
     The enumeration context.
final public static  intNOTATION_CONTEXT
     The notation context.
final public static  intNOTATION_TYPE_CONTEXT
     The notation type context.
final public static  intPI_CONTEXT
     The processing instruction context.
final public static  intSTART_TAG_CONTEXT
     The start tag context.
final public static  intTOP_LEVEL_CONTEXT
     The top level context.
final public static  intXML_DECL_CONTEXT
     The XML declaration context.
protected  charattrDelimiter
     The last attribute delimiter encountered.
protected  char[]buffer
     The recording buffer.
protected  booleancdataEndRead
    
protected  intcontext
     The current scanning context.
protected  intcurrent
     The current char.
protected  intdepth
     The depth in the xml tree.
protected  intend
     The end offset of the last lexical unit.
protected  booleaninDTD
     The scanner is in the internal DTD.
protected  LocalizableSupportlocalizableSupport
     The localizable support.
protected  booleanpiEndRead
     A PI end has been previously read.
protected  intposition
     The current position in the buffer.
protected  NormalizingReaderreader
     The reader.
protected  intstart
     The start offset of the last lexical unit.
protected  inttype
     The type of the current lexical unit.

Constructor Summary
public  XMLScanner(Reader r)
     Creates a new XML scanner.
public  XMLScanner(InputStream is, String enc)
     Creates a new XML scanner.
public  XMLScanner(String s)
     Creates a new XML scanner.

Method Summary
public  voidclearBuffer()
     Clears the buffer.
protected  XMLExceptioncreateXMLException(String message)
     Returns an XMLException initialized with the given message key.
public  StringformatMessage(String key, Object[] args)
     Implements org.apache.batik.i18n.Localizable.formatMessage(StringObject[]) .
public  char[]getBuffer()
     Returns the buffer used to store the chars.
public  intgetColumn()
     Returns the current column.
public  intgetContext()
     Returns the current context.
public  intgetDepth()
     Returns the current depth in the XML tree.
public  intgetEnd()
     Returns the end offset of the last lexical unit.
public  intgetEndOffset()
     Returns the end offset of the current lexical unit.
public  intgetLine()
     Returns the current line.
public  LocalegetLocale()
     Implements org.apache.batik.i18n.Localizable.getLocale .
public  intgetStart()
     Returns the start offset of the last lexical unit.
public  intgetStartOffset()
     Returns the start offset of the current lexical unit.
public  chargetStringDelimiter()
     Returns the last encountered string delimiter.
public  intgetType()
     The current lexical unit type like defined in LexicalUnits.
public  intnext()
     Advances to the next lexical unit.
public  intnext(int ctx)
     Advances to the next lexical unit.
Parameters:
  ctx - The context to use for scanning.
protected  intnextChar()
     Sets the value of the current char to the next character or -1 if the end of stream has been reached.
protected  intnextInAttList()
     Returns the next lexical unit in the context of an attribute list.
protected  intnextInAttributeValue()
     Returns the next lexical unit in the context of an attribute value.
protected  intnextInCDATASection()
     Returns the next lexical unit in the context of a CDATA section.
protected  intnextInContent()
     Returns the next lexical unit in the context of an element content.
protected  intnextInDTDDeclarations()
     Returns the next lexical unit in the context dtd declarations.
protected  intnextInDoctype()
     Returns the next lexical unit in the context of a doctype.
protected  intnextInDocumentStart()
     Reads the first token in the stream.
protected  intnextInElementDeclaration()
     Returns the next lexical unit in the context of a element declaration.
protected  intnextInEndTag()
     Returns the next lexical unit in the context of a end tag.
protected  intnextInEntity()
     Returns the next lexical unit in the context of an entity.
protected  intnextInEntityValue()
     Returns the next lexical unit in the context of an entity value.
protected  intnextInEnumeration()
     Returns the next lexical unit in the context of an enumeration.
protected  intnextInNotation()
     Returns the next lexical unit in the context of a notation.
protected  intnextInNotationType()
     Returns the next lexical unit in the context of a notation type.
protected  intnextInPI()
     Returns the next lexical unit in the context of a processing instruction.
protected  intnextInStartTag()
     Returns the next lexical unit in the context of a start tag.
protected  intnextInTopLevel()
     Advances to the next lexical unit in the top level context.
protected  intnextInXMLDecl()
     Returns the next lexical unit in the context of an XML declaration.
protected  intreadComment()
     Reads a comment.
protected  intreadIdentifier(String s, int type, int ntype)
     Reads the given identifier.
protected  intreadName(int type)
     Reads a name.
protected  intreadNmtoken()
     Reads a Nmtoken.
protected  intreadPEReference()
     Reads a parameter entity reference.
protected  intreadPIStart()
     Reads a processing instruction start.
protected  intreadReference()
     Reads an entity or character reference.
protected  intreadString()
     Reads a simple string, like the ones used for version, encoding, public/system identifiers...
public  voidsetContext(int c)
     Sets the current context.
public  voidsetDepth(int i)
     Sets the current depth in the XML tree.
public  voidsetLocale(Locale l)
     Implements org.apache.batik.i18n.Localizable.setLocale(Locale) .

Field Detail
ATTLIST_CONTEXT
final public static int ATTLIST_CONTEXT(Code)
The ATTLIST context.



ATTRIBUTE_VALUE_CONTEXT
final public static int ATTRIBUTE_VALUE_CONTEXT(Code)
The attribute value context.



BUNDLE_CLASSNAME
final protected static String BUNDLE_CLASSNAME(Code)
The default resource bundle base name.



CDATA_SECTION_CONTEXT
final public static int CDATA_SECTION_CONTEXT(Code)
The CDATA section context.



CONTENT_CONTEXT
final public static int CONTENT_CONTEXT(Code)
The content context.



DOCTYPE_CONTEXT
final public static int DOCTYPE_CONTEXT(Code)
The doctype context.



DOCUMENT_START_CONTEXT
final public static int DOCUMENT_START_CONTEXT(Code)
The document start context.



DTD_DECLARATIONS_CONTEXT
final public static int DTD_DECLARATIONS_CONTEXT(Code)
The DTD declarations context.



ELEMENT_DECLARATION_CONTEXT
final public static int ELEMENT_DECLARATION_CONTEXT(Code)
The element declaration context.



END_TAG_CONTEXT
final public static int END_TAG_CONTEXT(Code)
The end tag context.



ENTITY_CONTEXT
final public static int ENTITY_CONTEXT(Code)
The entity context.



ENTITY_VALUE_CONTEXT
final public static int ENTITY_VALUE_CONTEXT(Code)
The entity value context.



ENUMERATION_CONTEXT
final public static int ENUMERATION_CONTEXT(Code)
The enumeration context.



NOTATION_CONTEXT
final public static int NOTATION_CONTEXT(Code)
The notation context.



NOTATION_TYPE_CONTEXT
final public static int NOTATION_TYPE_CONTEXT(Code)
The notation type context.



PI_CONTEXT
final public static int PI_CONTEXT(Code)
The processing instruction context.



START_TAG_CONTEXT
final public static int START_TAG_CONTEXT(Code)
The start tag context.



TOP_LEVEL_CONTEXT
final public static int TOP_LEVEL_CONTEXT(Code)
The top level context.



XML_DECL_CONTEXT
final public static int XML_DECL_CONTEXT(Code)
The XML declaration context.



attrDelimiter
protected char attrDelimiter(Code)
The last attribute delimiter encountered.



buffer
protected char[] buffer(Code)
The recording buffer.



cdataEndRead
protected boolean cdataEndRead(Code)
A CDATA section end is the next token



context
protected int context(Code)
The current scanning context.



current
protected int current(Code)
The current char.



depth
protected int depth(Code)
The depth in the xml tree.



end
protected int end(Code)
The end offset of the last lexical unit.



inDTD
protected boolean inDTD(Code)
The scanner is in the internal DTD.



localizableSupport
protected LocalizableSupport localizableSupport(Code)
The localizable support.



piEndRead
protected boolean piEndRead(Code)
A PI end has been previously read.



position
protected int position(Code)
The current position in the buffer.



reader
protected NormalizingReader reader(Code)
The reader.



start
protected int start(Code)
The start offset of the last lexical unit.



type
protected int type(Code)
The type of the current lexical unit.




Constructor Detail
XMLScanner
public XMLScanner(Reader r) throws XMLException(Code)
Creates a new XML scanner.
Parameters:
  r - The reader to scan.



XMLScanner
public XMLScanner(InputStream is, String enc) throws XMLException(Code)
Creates a new XML scanner.
Parameters:
  is - The input stream to scan.
Parameters:
  enc - The character encoding to use.



XMLScanner
public XMLScanner(String s) throws XMLException(Code)
Creates a new XML scanner.
Parameters:
  s - The string to parse.




Method Detail
clearBuffer
public void clearBuffer()(Code)
Clears the buffer.



createXMLException
protected XMLException createXMLException(String message)(Code)
Returns an XMLException initialized with the given message key.



formatMessage
public String formatMessage(String key, Object[] args) throws MissingResourceException(Code)
Implements org.apache.batik.i18n.Localizable.formatMessage(StringObject[]) .



getBuffer
public char[] getBuffer()(Code)
Returns the buffer used to store the chars.



getColumn
public int getColumn()(Code)
Returns the current column.



getContext
public int getContext()(Code)
Returns the current context.



getDepth
public int getDepth()(Code)
Returns the current depth in the XML tree.



getEnd
public int getEnd()(Code)
Returns the end offset of the last lexical unit.



getEndOffset
public int getEndOffset()(Code)
Returns the end offset of the current lexical unit.



getLine
public int getLine()(Code)
Returns the current line.



getLocale
public Locale getLocale()(Code)
Implements org.apache.batik.i18n.Localizable.getLocale .



getStart
public int getStart()(Code)
Returns the start offset of the last lexical unit.



getStartOffset
public int getStartOffset()(Code)
Returns the start offset of the current lexical unit.



getStringDelimiter
public char getStringDelimiter()(Code)
Returns the last encountered string delimiter.



getType
public int getType()(Code)
The current lexical unit type like defined in LexicalUnits.



next
public int next() throws XMLException(Code)
Advances to the next lexical unit. The type of the lexical unit like defined in LexicalUnits.



next
public int next(int ctx) throws XMLException(Code)
Advances to the next lexical unit.
Parameters:
  ctx - The context to use for scanning. The type of the lexical unit like defined in LexicalUnits.



nextChar
protected int nextChar() throws IOException(Code)
Sets the value of the current char to the next character or -1 if the end of stream has been reached.



nextInAttList
protected int nextInAttList() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an attribute list.



nextInAttributeValue
protected int nextInAttributeValue() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an attribute value.



nextInCDATASection
protected int nextInCDATASection() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a CDATA section.



nextInContent
protected int nextInContent() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an element content.



nextInDTDDeclarations
protected int nextInDTDDeclarations() throws IOException, XMLException(Code)
Returns the next lexical unit in the context dtd declarations.



nextInDoctype
protected int nextInDoctype() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a doctype.



nextInDocumentStart
protected int nextInDocumentStart() throws IOException, XMLException(Code)
Reads the first token in the stream.



nextInElementDeclaration
protected int nextInElementDeclaration() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a element declaration.



nextInEndTag
protected int nextInEndTag() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a end tag.



nextInEntity
protected int nextInEntity() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an entity.



nextInEntityValue
protected int nextInEntityValue() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an entity value.



nextInEnumeration
protected int nextInEnumeration() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an enumeration.



nextInNotation
protected int nextInNotation() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a notation.



nextInNotationType
protected int nextInNotationType() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a notation type.



nextInPI
protected int nextInPI() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a processing instruction.



nextInStartTag
protected int nextInStartTag() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of a start tag.



nextInTopLevel
protected int nextInTopLevel() throws IOException, XMLException(Code)
Advances to the next lexical unit in the top level context. The type of the lexical unit like defined in LexicalUnits.



nextInXMLDecl
protected int nextInXMLDecl() throws IOException, XMLException(Code)
Returns the next lexical unit in the context of an XML declaration.



readComment
protected int readComment() throws IOException, XMLException(Code)
Reads a comment. '<!-' must have been read.



readIdentifier
protected int readIdentifier(String s, int type, int ntype) throws IOException, XMLException(Code)
Reads the given identifier.
Parameters:
  s - The portion of the identifier to read.
Parameters:
  type - The lexical unit type of the identifier.
Parameters:
  ntype - The lexical unit type to set if the identifier do notmatch or -1 if an error must be signaled.



readName
protected int readName(int type) throws IOException, XMLException(Code)
Reads a name. The current character must be the first character.
Parameters:
  type - The lexical unit type to set. type.



readNmtoken
protected int readNmtoken() throws IOException, XMLException(Code)
Reads a Nmtoken. The current character must be the first character. LexicalUnits.NMTOKEN.



readPEReference
protected int readPEReference() throws IOException, XMLException(Code)
Reads a parameter entity reference. The current character must be '%'. type.



readPIStart
protected int readPIStart() throws IOException, XMLException(Code)
Reads a processing instruction start. type.



readReference
protected int readReference() throws IOException, XMLException(Code)
Reads an entity or character reference. The current character must be '&'. type.



readString
protected int readString() throws IOException, XMLException(Code)
Reads a simple string, like the ones used for version, encoding, public/system identifiers... The current character must be the string delimiter. type.



setContext
public void setContext(int c)(Code)
Sets the current context.



setDepth
public void setDepth(int i)(Code)
Sets the current depth in the XML tree.



setLocale
public void setLocale(Locale l)(Code)
Implements org.apache.batik.i18n.Localizable.setLocale(Locale) .



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.