Java Doc for DOMInputImpl.java in  » XML » xerces-2_9_1 » org » apache » xerces » dom » 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 » XML » xerces 2_9_1 » org.apache.xerces.dom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.dom.DOMInputImpl

DOMInputImpl
public class DOMInputImpl implements LSInput(Code)
This Class DOMInputImpl represents a single input source for an XML entity.

This Class allows an application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, a byte stream (possibly with a specified encoding), and/or a character stream.

The exact definitions of a byte stream and a character stream are binding dependent.

There are two places that the application will deliver this input source to the parser: as the argument to the parse method, or as the return value of the DOMResourceResolver.resolveEntity method.

The DOMParser will use the LSInput object to determine how to read XML input. If there is a character stream available, the parser will read that stream directly; if not, the parser will use a byte stream, if available; if neither a character stream nor a byte stream is available, the parser will attempt to open a URI connection to the resource identified by the system identifier.

An LSInput object belongs to the application: the parser shall never modify it in any way (it may modify a copy if necessary). Eventhough all attributes in this interface are writable the DOM implementation is expected to never mutate a LSInput.

See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.
author:
   Gopal Sharma, SUN Microsystems Inc.
version:
   $Id: DOMInputImpl.java 447266 2006-09-18 05:57:49Z mrglavas $



Field Summary
protected  StringfBaseSystemId
    
protected  InputStreamfByteStream
    
protected  booleanfCertifiedText
    
protected  ReaderfCharStream
    
protected  StringfData
    
protected  StringfEncoding
    
protected  StringfPublicId
    
protected  StringfSystemId
    

Constructor Summary
public  DOMInputImpl()
    
public  DOMInputImpl(String publicId, String systemId, String baseSystemId)
     Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier.
public  DOMInputImpl(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding)
     Constructs an input source from a byte stream.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier.
public  DOMInputImpl(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding)
     Constructs an input source from a character stream.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier.
public  DOMInputImpl(String publicId, String systemId, String baseSystemId, String data, String encoding)
     Constructs an input source from a String.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier.

Method Summary
public  StringgetBaseURI()
     The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs.
public  InputStreamgetByteStream()
     An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property.
public  booleangetCertifiedText()
     If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
public  ReadergetCharacterStream()
     An attribute of a language-binding dependent type that represents a stream of 16-bit units.
public  StringgetEncoding()
     The character encoding, if known.
public  StringgetPublicId()
     The public identifier for this input source.
public  StringgetStringData()
     A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
public  StringgetSystemId()
     The system identifier, a URI reference , for this input source.
public  voidsetBaseURI(String baseURI)
     The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs.
public  voidsetByteStream(InputStream byteStream)
     An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property.
public  voidsetCertifiedText(boolean certifiedText)
     If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].
public  voidsetCharacterStream(Reader characterStream)
     An attribute of a language-binding dependent type that represents a stream of 16-bit units.
public  voidsetEncoding(String encoding)
     The character encoding, if known.
public  voidsetPublicId(String publicId)
     The public identifier for this input source.
public  voidsetStringData(String stringData)
     A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
public  voidsetSystemId(String systemId)
     The system identifier, a URI reference , for this input source.

Field Detail
fBaseSystemId
protected String fBaseSystemId(Code)



fByteStream
protected InputStream fByteStream(Code)



fCertifiedText
protected boolean fCertifiedText(Code)



fCharStream
protected Reader fCharStream(Code)



fData
protected String fData(Code)



fEncoding
protected String fEncoding(Code)



fPublicId
protected String fPublicId(Code)



fSystemId
protected String fSystemId(Code)




Constructor Detail
DOMInputImpl
public DOMInputImpl()(Code)
Default Constructor, constructs an input source



DOMInputImpl
public DOMInputImpl(String publicId, String systemId, String baseSystemId)(Code)
Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier. This value shouldalways be set, if possible, and can berelative or absolute. If the system identifieris relative, then the base system identifiershould be set.
Parameters:
  baseSystemId - The base system identifier. This value shouldalways be set to the fully expanded URI of thebase system identifier, if possible.



DOMInputImpl
public DOMInputImpl(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding)(Code)
Constructs an input source from a byte stream.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier. This value shouldalways be set, if possible, and can berelative or absolute. If the system identifieris relative, then the base system identifiershould be set.
Parameters:
  baseSystemId - The base system identifier. This value shouldalways be set to the fully expanded URI of thebase system identifier, if possible.
Parameters:
  byteStream - The byte stream.
Parameters:
  encoding - The encoding of the byte stream, if known.



DOMInputImpl
public DOMInputImpl(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding)(Code)
Constructs an input source from a character stream.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier. This value shouldalways be set, if possible, and can berelative or absolute. If the system identifieris relative, then the base system identifiershould be set.
Parameters:
  baseSystemId - The base system identifier. This value shouldalways be set to the fully expanded URI of thebase system identifier, if possible.
Parameters:
  charStream - The character stream.
Parameters:
  encoding - The original encoding of the byte streamused by the reader, if known.



DOMInputImpl
public DOMInputImpl(String publicId, String systemId, String baseSystemId, String data, String encoding)(Code)
Constructs an input source from a String.
Parameters:
  publicId - The public identifier, if known.
Parameters:
  systemId - The system identifier. This value shouldalways be set, if possible, and can berelative or absolute. If the system identifieris relative, then the base system identifiershould be set.
Parameters:
  baseSystemId - The base system identifier. This value shouldalways be set to the fully expanded URI of thebase system identifier, if possible.
Parameters:
  data - The String Data.
Parameters:
  encoding - The original encoding of the byte streamused by the reader, if known.




Method Detail
getBaseURI
public String getBaseURI()(Code)
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. If the baseURI is itself a relative URI, the behavior is implementation dependent.



getByteStream
public InputStream getByteStream()(Code)
An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property. Setting the encoding in this way will override any encoding specified in the XML declaration itself.



getCertifiedText
public boolean getCertifiedText()(Code)
If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].



getCharacterStream
public Reader getCharacterStream()(Code)
An attribute of a language-binding dependent type that represents a stream of 16-bit units. Application must encode the stream using UTF-16 (defined in and Amendment 1 of ).
If a character stream is specified, the parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.



getEncoding
public String getEncoding()(Code)
The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ( section 4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a character stream. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML claration or the Text Declaration, or an encoding obtained from a higher level protocol, such as HTTP .



getPublicId
public String getPublicId()(Code)
The public identifier for this input source. The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.



getStringData
public String getStringData()(Code)
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
If string data is available in the input source, the parser will ignore the character stream and the byte stream and will not attempt to open a URI connection to the system identifier.



getSystemId
public String getSystemId()(Code)
The system identifier, a URI reference , for this input source. The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to fetch the ressource identifier by the URI reference only if there is no byte stream or character stream specified).
If the application knows the character encoding of the object pointed to by the system identifier, it can register the encoding by setting the encoding attribute.
If the system ID is a relative URI reference (see section 5 in ), the behavior is implementation dependent.



setBaseURI
public void setBaseURI(String baseURI)(Code)
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. If the baseURI is itself a relative URI, the behavior is implementation dependent.



setByteStream
public void setByteStream(InputStream byteStream)(Code)
An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property. Setting the encoding in this way will override any encoding specified in the XML declaration itself.



setCertifiedText
public void setCertifiedText(boolean certifiedText)(Code)
If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1].



setCharacterStream
public void setCharacterStream(Reader characterStream)(Code)
An attribute of a language-binding dependent type that represents a stream of 16-bit units. Application must encode the stream using UTF-16 (defined in and Amendment 1 of ).
If a character stream is specified, the parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.



setEncoding
public void setEncoding(String encoding)(Code)
The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ( section 4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a character stream. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML claration or the Text Declaration, or an encoding obtained from a higher level protocol, such as HTTP .



setPublicId
public void setPublicId(String publicId)(Code)
The public identifier for this input source. The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.



setStringData
public void setStringData(String stringData)(Code)
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
If string data is available in the input source, the parser will ignore the character stream and the byte stream and will not attempt to open a URI connection to the system identifier.



setSystemId
public void setSystemId(String systemId)(Code)
The system identifier, a URI reference , for this input source. The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to fetch the ressource identifier by the URI reference only if there is no byte stream or character stream specified).
If the application knows the character encoding of the object pointed to by the system identifier, it can register the encoding by setting the encoding attribute.
If the system ID is a relative URI reference (see section 5 in ), the behavior is implementation dependent.



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.