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


java.lang.Object
   com.sun.xml.stream.XMLScanner
      com.sun.xml.stream.XMLDocumentFragmentScannerImpl

All known Subclasses:   com.sun.xml.stream.XMLDocumentScannerImpl,
XMLDocumentFragmentScannerImpl
public class XMLDocumentFragmentScannerImpl extends XMLScanner implements XMLDocumentScanner,XMLComponent,XMLEntityHandler(Code)
This class is responsible for scanning the structure and content of document fragments. This class has been modified as per the new design which is more suited to efficiently build pull parser. Lot of improvements have been done and the code has been added to support stax functionality/features.
author:
   Neeraj Bajaj SUN Microsystems
author:
   K.Venugopal SUN Microsystems
author:
   Glenn Marcy, IBM
author:
   Andy Clark, IBM
author:
   Arnaud Le Hors, IBM
author:
   Eric Ye, IBM
author:
   Sunitha Reddy SUN Microsystems
version:
   $Id: XMLDocumentFragmentScannerImpl.java,v 1.5 2006/11/29 22:01:32 spericas Exp $

Inner Class :final protected static class Element
Inner Class :protected class ElementStack2
Inner Class :protected class ElementStack
Inner Class :protected interface Driver
Inner Class :protected class FragmentContentDriver implements Driver

Field Summary
final protected static  booleanDEBUG
    
final protected static  booleanDEBUG_COALESCE
    
final protected static  booleanDEBUG_CONTENT_SCANNING
     Debug content driver scanning.
final protected static  booleanDEBUG_NEXT
    
final static  booleanDEBUG_SKIP_ALGORITHM
    
final static  shortELEMENT_ARRAY_LENGTH
    
final static  shortMAX_DEPTH_LIMIT
    
final static  shortMAX_POINTER_AT_A_DEPTH
    
final protected static  StringNAMESPACES
     Feature identifier: namespaces.
final protected static  StringNOTIFY_BUILTIN_REFS
     Feature identifier: notify built-in refereces.
final protected static  intSCANNER_STATE_ATTRIBUTE
    
final protected static  intSCANNER_STATE_ATTRIBUTE_VALUE
    
final protected static  intSCANNER_STATE_BUILT_IN_REFS
    
final protected static  intSCANNER_STATE_CDATA
     Scanner state: CDATA section.
final protected static  intSCANNER_STATE_CHARACTER_DATA
     Scanner state: Text declaration.
final protected static  intSCANNER_STATE_CHAR_REFERENCE
    
final protected static  intSCANNER_STATE_COMMENT
     Scanner state: comment.
final protected static  intSCANNER_STATE_CONTENT
     Scanner state: content.
final protected static  intSCANNER_STATE_DOCTYPE
     Scanner state: DOCTYPE.
final protected static  intSCANNER_STATE_END_ELEMENT_TAG
    
final protected static  intSCANNER_STATE_END_OF_INPUT
     Scanner state: end of input.
final protected static  intSCANNER_STATE_PI
     Scanner state: processing instruction.
final protected static  intSCANNER_STATE_REFERENCE
     Scanner state: reference.
final protected static  intSCANNER_STATE_ROOT_ELEMENT
     Scanner state: root element.
final protected static  intSCANNER_STATE_START_ELEMENT_TAG
    
final protected static  intSCANNER_STATE_START_OF_MARKUP
     Scanner state: start of markup.
final protected static  intSCANNER_STATE_TERMINATED
     Scanner state: terminated.
final protected static  intSCANNER_STATE_TEXT_DECL
     Scanner state: Text declaration.
final protected static  intSCANNER_STATE_XML_DECL
    
final protected static  char[]cdata
    
protected  DTDGrammarUtildtdGrammarUtil
    
final protected static  char[]endTag
    
protected  booleanfAdd
    
protected  booleanfAddDefaultAttr
    
protected  QNamefAttributeQName
     Attribute QName.
protected  XMLAttributesIteratorImplfAttributes
     CHANGED: Using XMLAttributesIteratorImpl instead of XMLAttributesImpl.
protected  XMLStringBufferfContentBuffer
    
protected  DriverfContentDriver
     Content driver.
protected  QNamefCurrentElement
     Current element.
protected  StringfDeclaredEncoding
    
protected  XMLDocumentHandlerfDocumentHandler
     Document handler.
protected  DriverfDriver
     Active driver.
 String[]fElementArray
    
 shortfElementPointer
    
protected  QNamefElementQName
     Element QName.
protected  StringfElementRawname
    
protected  ElementStackfElementStack
     Element stack.
protected  ElementStack2fElementStack2
    
protected  booleanfEmptyElement
    
protected  int[]fEntityStack
     Entity stack.
protected  XMLEntityStoragefEntityStore
    
protected  booleanfHasExternalDTD
    
protected  booleanfInScanContent
     SubScanner state: inside scanContent method.
protected  booleanfIsCoalesce
    
 shortfLastPointerLocation
    
protected  booleanfLastSectionWasCData
    
protected  booleanfLastSectionWasCharacterData
    
protected  booleanfLastSectionWasEntityReference
    
protected  intfMarkupDepth
     Markup depth.
protected  booleanfNamespaces
     Namespaces.
protected  booleanfNotifyBuiltInRefs
     Notify built-in references.
protected  XMLStringfPIData
    
protected  StringfPITarget
     Document system identifier.
 short[][]fPointerInfo
    
protected  booleanfReplaceEntityReferences
    
protected  booleanfReportCdataEvent
    
protected  booleanfScanToEnd
    
protected  intfScannerState
     Scanner state.
protected  booleanfShouldSkip
    
protected  booleanfSkip
    
protected  booleanfStandalone
     Standalone.
protected  XMLStringBufferfStringBuffer
     Making the buffer accesible to derived class -- String buffer.
protected  XMLStringBufferfStringBuffer2
     Making the buffer accesible to derived class -- String buffer.
protected  booleanfSupportExternalEntities
    
protected  XMLStringfTempString
     String.
protected  XMLStringfTempString2
     String.
 booleanfUsebuffer
    
protected  StringfVersion
    
protected  booleanfoundBuiltInRefs
    
final protected static  char[]xmlDecl
    

Constructor Summary
public  XMLDocumentFragmentScannerImpl()
     Default constructor.

Method Summary
 voidaddElement(String rawname)
    
 booleancanStore(short depth, short column)
    
protected  DrivercreateContentDriver()
     Creates a content Driver.
public  voidendEntity(String name)
     This method notifies the end of an entity.
public  XMLAttributesIteratorImplgetAttributeIterator()
    
public  XMLStringgetCharacterData()
    
public  StringgetComment()
    
public  XMLDocumentHandlergetDocumentHandler()
    
public  StringgetDriverName(Driver driver)
     Returns the driver name.
 shortgetElementPointer(short depth, short column)
    
public  StringgetEntityName()
    
public  BooleangetFeatureDefault(String featureId)
     Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
public  XMLStringBuffergetPIData()
    
public  StringgetPITarget()
    
public  ObjectgetPropertyDefault(String propertyId)
     Returns the default state for a property, or null if this component does not want to report a default value for this property.
public  String[]getRecognizedFeatures()
     Returns a list of feature identifiers that are recognized by this component.
public  String[]getRecognizedProperties()
     Returns a list of property identifiers that are recognized by this component.
protected  StringgetScannerStateName(int state)
     Returns the scanner state name.
public  booleanhasAttributes()
    
public  booleanisStandAlone()
    
public  intnext()
    
static  voidpr(String str)
    
public  voidreset(XMLComponentManager componentManager)
     Resets the component.
public  voidreset(PropertyManager propertyManager)
    
 voidresetPointer(short depth, short column)
    
protected  voidscanAttribute(XMLAttributes attributes)
     Scans an attribute name value pair.

 [41] Attribute ::= Name Eq AttValue
 

Note: This method assumes that the next character on the stream is the first character of the attribute name.

Note: This method uses the fAttributeQName and fQName variables.

protected  booleanscanCDATASection(XMLStringBuffer contentBuffer, boolean complete)
     Scans a CDATA section.

Note: This method uses the fTempString and fStringBuffer variables.
Parameters:
  complete - True if the CDATA section is to be scannedcompletely.

protected  voidscanCharReference()
     Scans a character reference.
protected  voidscanComment()
     Scans a comment.
protected  intscanContent(XMLStringBuffer content)
     Scans element content.
public  booleanscanDocument(boolean complete)
     Scans a document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler.
protected  intscanEndElement()
     Scans an end element.

 [42] ETag ::= '</' Name S? '>'
 

Note: This method uses the fElementQName variable. The contents of this variable will be destroyed.

protected  voidscanEntityReference(XMLStringBuffer content)
     Scans an entity reference. returns true if the new entity is started.
protected  voidscanPIData(String target, XMLStringBuffer data)
     Scans a processing data.
protected  booleanscanStartElement()
     Scans a start element.
protected  voidscanXMLDeclOrTextDecl(boolean scanningTextDecl)
     Scans an XML or text declaration.
public  voidsetDocumentHandler(XMLDocumentHandler documentHandler)
    
final protected  voidsetDriver(Driver driver)
     Sets the Driver.
public  voidsetFeature(String featureId, boolean state)
     Sets the state of a feature.
public  voidsetInputSource(XMLInputSource inputSource)
     Sets the input source.
public  voidsetProperty(String propertyId, Object value)
     Sets the value of a property.
final protected  voidsetScannerState(int state)
     Sets the scanner state.
protected  booleanskipElement()
    
 booleanskipElement(short column)
    
 booleanskipFromTheBuffer(String rawname)
    
 booleanskipQElement(QName name)
    
 booleanskipQElement(String rawname)
    
public  voidstartEntity(String name, XMLResourceIdentifier identifier, String encoding)
     This method notifies of the start of an entity.
 shortstorePointerForADepth(short elementPointer)
    

Field Detail
DEBUG
final protected static boolean DEBUG(Code)
Debug driver next



DEBUG_COALESCE
final protected static boolean DEBUG_COALESCE(Code)



DEBUG_CONTENT_SCANNING
final protected static boolean DEBUG_CONTENT_SCANNING(Code)
Debug content driver scanning.



DEBUG_NEXT
final protected static boolean DEBUG_NEXT(Code)
Debug driver next



DEBUG_SKIP_ALGORITHM
final static boolean DEBUG_SKIP_ALGORITHM(Code)



ELEMENT_ARRAY_LENGTH
final static short ELEMENT_ARRAY_LENGTH(Code)



MAX_DEPTH_LIMIT
final static short MAX_DEPTH_LIMIT(Code)



MAX_POINTER_AT_A_DEPTH
final static short MAX_POINTER_AT_A_DEPTH(Code)



NAMESPACES
final protected static String NAMESPACES(Code)
Feature identifier: namespaces.



NOTIFY_BUILTIN_REFS
final protected static String NOTIFY_BUILTIN_REFS(Code)
Feature identifier: notify built-in refereces.



SCANNER_STATE_ATTRIBUTE
final protected static int SCANNER_STATE_ATTRIBUTE(Code)



SCANNER_STATE_ATTRIBUTE_VALUE
final protected static int SCANNER_STATE_ATTRIBUTE_VALUE(Code)



SCANNER_STATE_BUILT_IN_REFS
final protected static int SCANNER_STATE_BUILT_IN_REFS(Code)



SCANNER_STATE_CDATA
final protected static int SCANNER_STATE_CDATA(Code)
Scanner state: CDATA section.



SCANNER_STATE_CHARACTER_DATA
final protected static int SCANNER_STATE_CHARACTER_DATA(Code)
Scanner state: Text declaration.



SCANNER_STATE_CHAR_REFERENCE
final protected static int SCANNER_STATE_CHAR_REFERENCE(Code)



SCANNER_STATE_COMMENT
final protected static int SCANNER_STATE_COMMENT(Code)
Scanner state: comment.



SCANNER_STATE_CONTENT
final protected static int SCANNER_STATE_CONTENT(Code)
Scanner state: content.



SCANNER_STATE_DOCTYPE
final protected static int SCANNER_STATE_DOCTYPE(Code)
Scanner state: DOCTYPE.



SCANNER_STATE_END_ELEMENT_TAG
final protected static int SCANNER_STATE_END_ELEMENT_TAG(Code)



SCANNER_STATE_END_OF_INPUT
final protected static int SCANNER_STATE_END_OF_INPUT(Code)
Scanner state: end of input.



SCANNER_STATE_PI
final protected static int SCANNER_STATE_PI(Code)
Scanner state: processing instruction.



SCANNER_STATE_REFERENCE
final protected static int SCANNER_STATE_REFERENCE(Code)
Scanner state: reference.



SCANNER_STATE_ROOT_ELEMENT
final protected static int SCANNER_STATE_ROOT_ELEMENT(Code)
Scanner state: root element.



SCANNER_STATE_START_ELEMENT_TAG
final protected static int SCANNER_STATE_START_ELEMENT_TAG(Code)



SCANNER_STATE_START_OF_MARKUP
final protected static int SCANNER_STATE_START_OF_MARKUP(Code)
Scanner state: start of markup.



SCANNER_STATE_TERMINATED
final protected static int SCANNER_STATE_TERMINATED(Code)
Scanner state: terminated.



SCANNER_STATE_TEXT_DECL
final protected static int SCANNER_STATE_TEXT_DECL(Code)
Scanner state: Text declaration.



SCANNER_STATE_XML_DECL
final protected static int SCANNER_STATE_XML_DECL(Code)
Scanner state: XML Declaration



cdata
final protected static char[] cdata(Code)



dtdGrammarUtil
protected DTDGrammarUtil dtdGrammarUtil(Code)



endTag
final protected static char[] endTag(Code)



fAdd
protected boolean fAdd(Code)



fAddDefaultAttr
protected boolean fAddDefaultAttr(Code)



fAttributeQName
protected QName fAttributeQName(Code)
Attribute QName.



fAttributes
protected XMLAttributesIteratorImpl fAttributes(Code)
CHANGED: Using XMLAttributesIteratorImpl instead of XMLAttributesImpl. This class implements Iterator interface so we can directly give Attributes in the form of iterator.



fContentBuffer
protected XMLStringBuffer fContentBuffer(Code)
Making the buffer accesible to derived class -- stores PI data



fContentDriver
protected Driver fContentDriver(Code)
Content driver.



fCurrentElement
protected QName fCurrentElement(Code)
Current element.



fDeclaredEncoding
protected String fDeclaredEncoding(Code)



fDocumentHandler
protected XMLDocumentHandler fDocumentHandler(Code)
Document handler.



fDriver
protected Driver fDriver(Code)
Active driver.



fElementArray
String[] fElementArray(Code)



fElementPointer
short fElementPointer(Code)



fElementQName
protected QName fElementQName(Code)
Element QName.



fElementRawname
protected String fElementRawname(Code)



fElementStack
protected ElementStack fElementStack(Code)
Element stack.



fElementStack2
protected ElementStack2 fElementStack2(Code)



fEmptyElement
protected boolean fEmptyElement(Code)



fEntityStack
protected int[] fEntityStack(Code)
Entity stack.



fEntityStore
protected XMLEntityStorage fEntityStore(Code)
Entity Storage



fHasExternalDTD
protected boolean fHasExternalDTD(Code)
has external dtd



fInScanContent
protected boolean fInScanContent(Code)
SubScanner state: inside scanContent method.



fIsCoalesce
protected boolean fIsCoalesce(Code)



fLastPointerLocation
short fLastPointerLocation(Code)



fLastSectionWasCData
protected boolean fLastSectionWasCData(Code)



fLastSectionWasCharacterData
protected boolean fLastSectionWasCharacterData(Code)



fLastSectionWasEntityReference
protected boolean fLastSectionWasEntityReference(Code)



fMarkupDepth
protected int fMarkupDepth(Code)
Markup depth.



fNamespaces
protected boolean fNamespaces(Code)
Namespaces.



fNotifyBuiltInRefs
protected boolean fNotifyBuiltInRefs(Code)
Notify built-in references.



fPIData
protected XMLString fPIData(Code)



fPITarget
protected String fPITarget(Code)
Document system identifier. REVISIT: So what's this used for? - NG protected String fDocumentSystemId;



fPointerInfo
short[][] fPointerInfo(Code)



fReplaceEntityReferences
protected boolean fReplaceEntityReferences(Code)



fReportCdataEvent
protected boolean fReportCdataEvent(Code)



fScanToEnd
protected boolean fScanToEnd(Code)



fScannerState
protected int fScannerState(Code)
Scanner state.



fShouldSkip
protected boolean fShouldSkip(Code)



fSkip
protected boolean fSkip(Code)



fStandalone
protected boolean fStandalone(Code)
Standalone.



fStringBuffer
protected XMLStringBuffer fStringBuffer(Code)
Making the buffer accesible to derived class -- String buffer.



fStringBuffer2
protected XMLStringBuffer fStringBuffer2(Code)
Making the buffer accesible to derived class -- String buffer.



fSupportExternalEntities
protected boolean fSupportExternalEntities(Code)



fTempString
protected XMLString fTempString(Code)
String.



fTempString2
protected XMLString fTempString2(Code)
String.



fUsebuffer
boolean fUsebuffer(Code)



fVersion
protected String fVersion(Code)



foundBuiltInRefs
protected boolean foundBuiltInRefs(Code)



xmlDecl
final protected static char[] xmlDecl(Code)




Constructor Detail
XMLDocumentFragmentScannerImpl
public XMLDocumentFragmentScannerImpl()(Code)
Default constructor.




Method Detail
addElement
void addElement(String rawname)(Code)



canStore
boolean canStore(short depth, short column)(Code)



createContentDriver
protected Driver createContentDriver()(Code)
Creates a content Driver.



endEntity
public void endEntity(String name) throws IOException, XNIException(Code)
This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
Parameters:
  name - The name of the entity.
throws:
  XNIException - Thrown by handler to signal an error.



getAttributeIterator
public XMLAttributesIteratorImpl getAttributeIterator()(Code)
return the attribute iterator implementation



getCharacterData
public XMLString getCharacterData()(Code)



getComment
public String getComment()(Code)



getDocumentHandler
public XMLDocumentHandler getDocumentHandler()(Code)
Returns the document handler



getDriverName
public String getDriverName(Driver driver)(Code)
Returns the driver name.



getElementPointer
short getElementPointer(short depth, short column)(Code)



getEntityName
public String getEntityName()(Code)



getFeatureDefault
public Boolean getFeatureDefault(String featureId)(Code)
Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
Parameters:
  featureId - The feature identifier.
since:
   Xerces 2.2.0



getPIData
public XMLStringBuffer getPIData()(Code)



getPITarget
public String getPITarget()(Code)



getPropertyDefault
public Object getPropertyDefault(String propertyId)(Code)
Returns the default state for a property, or null if this component does not want to report a default value for this property.
Parameters:
  propertyId - The property identifier.
since:
   Xerces 2.2.0



getRecognizedFeatures
public String[] getRecognizedFeatures()(Code)
Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.



getRecognizedProperties
public String[] getRecognizedProperties()(Code)
Returns a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.



getScannerStateName
protected String getScannerStateName(int state)(Code)
Returns the scanner state name.



hasAttributes
public boolean hasAttributes()(Code)



isStandAlone
public boolean isStandAlone()(Code)
return if the doucment is standalone



next
public int next() throws IOException, XNIException(Code)
return the next state on the input int



pr
static void pr(String str)(Code)



reset
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)
Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
Parameters:
  componentManager - The component manager.
throws:
  SAXException - Thrown by component on initialization error.For example, if a feature or property isrequired for the operation of the component, thecomponent manager may throw aSAXNotRecognizedException or aSAXNotSupportedException.



reset
public void reset(PropertyManager propertyManager)(Code)



resetPointer
void resetPointer(short depth, short column)(Code)



scanAttribute
protected void scanAttribute(XMLAttributes attributes) throws IOException, XNIException(Code)
Scans an attribute name value pair.

 [41] Attribute ::= Name Eq AttValue
 

Note: This method assumes that the next character on the stream is the first character of the attribute name.

Note: This method uses the fAttributeQName and fQName variables. The contents of these variables will be destroyed.
Parameters:
  attributes - The attributes list for the scanned attribute.




scanCDATASection
protected boolean scanCDATASection(XMLStringBuffer contentBuffer, boolean complete) throws IOException, XNIException(Code)
Scans a CDATA section.

Note: This method uses the fTempString and fStringBuffer variables.
Parameters:
  complete - True if the CDATA section is to be scannedcompletely. True if CDATA is completely scanned.




scanCharReference
protected void scanCharReference() throws IOException, XNIException(Code)
Scans a character reference.

 [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
 



scanComment
protected void scanComment() throws IOException, XNIException(Code)
Scans a comment.

 [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
 

Note: Called after scanning past '<!--'




scanContent
protected int scanContent(XMLStringBuffer content) throws IOException, XNIException(Code)
Scans element content. Returns the next character on the stream.



scanDocument
public boolean scanDocument(boolean complete) throws IOException, XNIException(Code)
Scans a document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler. A value of false indicates thatthat the scanner should only scan the next portionof the document and return. A scanner instance ispermitted to completely scan a document if it doesnot support this "pull" scanning model. True if there is more to scan, false otherwise.



scanEndElement
protected int scanEndElement() throws IOException, XNIException(Code)
Scans an end element.

 [42] ETag ::= '</' Name S? '>'
 

Note: This method uses the fElementQName variable. The contents of this variable will be destroyed. The caller should copy the needed information out of this variable before calling this method. The element depth.




scanEntityReference
protected void scanEntityReference(XMLStringBuffer content) throws IOException, XNIException(Code)
Scans an entity reference. returns true if the new entity is started. If it was built-in entity 'false' is returned.
throws:
  IOException - Thrown if i/o error occurs.
throws:
  XNIException - Thrown if handler throws exception uponnotification.



scanPIData
protected void scanPIData(String target, XMLStringBuffer data) throws IOException, XNIException(Code)
Scans a processing data. This is needed to handle the situation where a document starts with a processing instruction whose target name starts with "xml". (e.g. xmlfoo)
Parameters:
  target - The PI target
Parameters:
  data - The XMLStringBuffer to fill in with the data



scanStartElement
protected boolean scanStartElement() throws IOException, XNIException(Code)
Scans a start element. This method will handle the binding of namespace information and notifying the handler of the start of the element.

 [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
 [40] STag ::= '<' Name (S Attribute)* S? '>'
 

Note: This method assumes that the leading '<' character has been consumed.

Note: This method uses the fElementQName and fAttributes variables. The contents of these variables will be destroyed. The caller should copy important information out of these variables before calling this method. NB: Content in fAttributes is valid only till the state of the parser is XMLEvent.START_ELEMENT True if element is empty. (i.e. It matchesproduction [44].




scanXMLDeclOrTextDecl
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, XNIException(Code)
Scans an XML or text declaration.

 [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
 [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
 [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'" )
 [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
 [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
 | ('"' ('yes' | 'no') '"'))
 [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
 

Parameters:
  scanningTextDecl - True if a text declaration is tobe scanned instead of an XMLdeclaration.



setDocumentHandler
public void setDocumentHandler(XMLDocumentHandler documentHandler)(Code)
setDocumentHandler
Parameters:
  documentHandler -



setDriver
final protected void setDriver(Driver driver)(Code)
Sets the Driver.
Parameters:
  Driver - The new Driver.



setFeature
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)
Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.

Note: Components should silently ignore features that do not affect the operation of the component.
Parameters:
  featureId - The feature identifier.
Parameters:
  state - The state of the feature.
throws:
  SAXNotRecognizedException - The component should not throwthis exception.
throws:
  SAXNotSupportedException - The component should not throwthis exception.




setInputSource
public void setInputSource(XMLInputSource inputSource) throws IOException(Code)
Sets the input source.
Parameters:
  inputSource - The input source.
throws:
  IOException - Thrown on i/o error.



setProperty
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)
Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.

Note: Components should silently ignore properties that do not affect the operation of the component.
Parameters:
  propertyId - The property identifier.
Parameters:
  value - The value of the property.
throws:
  SAXNotRecognizedException - The component should not throwthis exception.
throws:
  SAXNotSupportedException - The component should not throwthis exception.




setScannerState
final protected void setScannerState(int state)(Code)
Sets the scanner state.
Parameters:
  state - The new scanner state.



skipElement
protected boolean skipElement() throws IOException(Code)



skipElement
boolean skipElement(short column) throws IOException(Code)



skipFromTheBuffer
boolean skipFromTheBuffer(String rawname) throws IOException(Code)



skipQElement
boolean skipQElement(QName name) throws IOException(Code)



skipQElement
boolean skipQElement(String rawname) throws IOException(Code)



startEntity
public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)
This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
Parameters:
  name - The name of the entity.
Parameters:
  identifier - The resource identifier.
Parameters:
  encoding - The auto-detected IANA encoding name of the entitystream. This value will be null in those situationswhere the entity encoding is not auto-detected (e.g.internal entities or a document entity that isparsed from a java.io.Reader).
throws:
  XNIException - Thrown by handler to signal an error.



storePointerForADepth
short storePointerForADepth(short elementPointer)(Code)



Fields inherited from com.sun.xml.stream.XMLScanner
final protected static boolean DEBUG_ATTR_NORMALIZATION(Code)(Java Doc)
final protected static String ENTITY_MANAGER(Code)(Java Doc)
final protected static String ERROR_REPORTER(Code)(Java Doc)
final protected static String NOTIFY_CHAR_REFS(Code)(Java Doc)
final protected static String SYMBOL_TABLE(Code)(Java Doc)
final protected static String VALIDATION(Code)(Java Doc)
protected ArrayList attributeValueCache(Code)(Java Doc)
final protected static String fAmpSymbol(Code)(Java Doc)
final protected static String fAposSymbol(Code)(Java Doc)
protected boolean fAttributeCacheInitDone(Code)(Java Doc)
protected int fAttributeCacheUsedCount(Code)(Java Doc)
protected String fCharRefLiteral(Code)(Java Doc)
final protected static String fEncodingSymbol(Code)(Java Doc)
protected int fEntityDepth(Code)(Java Doc)
protected XMLEntityManager fEntityManager(Code)(Java Doc)
protected XMLEntityReaderImpl fEntityScanner(Code)(Java Doc)
protected XMLEntityStorage fEntityStore(Code)(Java Doc)
protected XMLErrorReporter fErrorReporter(Code)(Java Doc)
protected XMLEvent fEvent(Code)(Java Doc)
final protected static String fGtSymbol(Code)(Java Doc)
final protected static String fLtSymbol(Code)(Java Doc)
protected boolean fNotifyCharRefs(Code)(Java Doc)
protected PropertyManager fPropertyManager(Code)(Java Doc)
final protected static String fQuotSymbol(Code)(Java Doc)
protected boolean fReportEntity(Code)(Java Doc)
protected XMLResourceIdentifierImpl fResourceIdentifier(Code)(Java Doc)
protected boolean fScanningAttribute(Code)(Java Doc)
final protected static String fStandaloneSymbol(Code)(Java Doc)
protected int fStringBufferIndex(Code)(Java Doc)
protected SymbolTable fSymbolTable(Code)(Java Doc)
protected boolean fValidation(Code)(Java Doc)
final protected static String fVersionSymbol(Code)(Java Doc)
int initialCacheCount(Code)(Java Doc)
protected ArrayList stringBufferCache(Code)(Java Doc)

Methods inherited from com.sun.xml.stream.XMLScanner
public void endEntity(String name) throws IOException, XNIException(Code)(Java Doc)
public boolean getFeature(String featureId) throws XMLConfigurationException(Code)(Java Doc)
XMLStringBuffer getStringBuffer()(Code)(Java Doc)
protected static boolean isInvalid(int value)(Code)(Java Doc)
protected static boolean isInvalidLiteral(int value)(Code)(Java Doc)
protected static boolean isValidNCName(int value)(Code)(Java Doc)
protected static boolean isValidNameChar(int value)(Code)(Java Doc)
protected static boolean isValidNameStartChar(int value)(Code)(Java Doc)
protected void normalizeWhitespace(XMLString value)(Code)(Java Doc)
protected void reportFatalError(String msgId, Object[] args) throws XNIException(Code)(Java Doc)
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc)
public void reset(PropertyManager propertyManager)(Code)(Java Doc)
protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) throws IOException, XNIException(Code)(Java Doc)
protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) throws IOException, XNIException(Code)(Java Doc)
protected void scanComment(XMLStringBuffer text) throws IOException, XNIException(Code)(Java Doc)
protected void scanExternalID(String[] identifiers, boolean optionalSystemId) throws IOException, XNIException(Code)(Java Doc)
protected void scanPI(XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc)
protected void scanPIData(String target, XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc)
public String scanPseudoAttribute(boolean scanningTextDecl, XMLString value) throws IOException, XNIException(Code)(Java Doc)
protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException(Code)(Java Doc)
protected boolean scanSurrogates(XMLStringBuffer buf) throws IOException, XNIException(Code)(Java Doc)
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl, String[] pseudoAttributeValues) throws IOException, XNIException(Code)(Java Doc)
public void setFeature(String featureId, boolean value) throws XMLConfigurationException(Code)(Java Doc)
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc)
protected void setPropertyManager(PropertyManager propertyManager)(Code)(Java Doc)
public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)(Java Doc)
protected boolean versionSupported(String version)(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.