Java Doc for InputSource.java in  » Database-DBMS » Quadcap-Embeddable-Database » org » xml » sax » 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 » Database DBMS » Quadcap Embeddable Database » org.xml.sax 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.InputSource

InputSource
public class InputSource (Code)
A single input source for an XML entity.

This class allows a SAX 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.

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

The SAX parser will use the InputSource 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 InputSource object belongs to the application: the SAX parser shall never modify it in any way (it may modify a copy if necessary).


author:
   David Megginson (ak117@freenet.carleton.ca)
version:
   1.0
See Also:   org.xml.sax.Parser.parse
See Also:   org.xml.sax.EntityResolver.resolveEntity
See Also:   java.io.InputStream
See Also:   java.io.Reader



Constructor Summary
public  InputSource()
     Zero-argument default constructor.
public  InputSource(String systemId)
     Create a new input source with a system identifier.
public  InputSource(InputStream byteStream)
     Create a new input source with a byte stream.
public  InputSource(Reader characterStream)
     Create a new input source with a character stream.

Method Summary
public  InputStreamgetByteStream()
     Get the byte stream for this input source.
public  ReadergetCharacterStream()
     Get the character stream for this input source.
public  StringgetEncoding()
     Get the character encoding for a byte stream or URI.
public  StringgetPublicId()
     Get the public identifier for this input source.
public  StringgetSystemId()
     Get the system identifier for this input source.
public  voidsetByteStream(InputStream byteStream)
     Set the byte stream for this input source.
public  voidsetCharacterStream(Reader characterStream)
     Set the character stream for this input source.
public  voidsetEncoding(String encoding)
     Set the character encoding, if known.
public  voidsetPublicId(String publicId)
     Set the public identifier for this input source.
public  voidsetSystemId(String systemId)
     Set the system identifier for this input source.


Constructor Detail
InputSource
public InputSource()(Code)
Zero-argument default constructor.
See Also:   InputSource.setPublicId
See Also:   InputSource.setSystemId
See Also:   InputSource.setByteStream
See Also:   InputSource.setCharacterStream
See Also:   InputSource.setEncoding



InputSource
public InputSource(String systemId)(Code)
Create a new input source with a system identifier.

Applications may use setPublicId to include a public identifier as well, or setEncoding to specify the character encoding, if known.

If the system identifier is a URL, it must be full resolved.


Parameters:
  systemId - The system identifier (URI).
See Also:   InputSource.setPublicId
See Also:   InputSource.setSystemId
See Also:   InputSource.setByteStream
See Also:   InputSource.setEncoding
See Also:   InputSource.setCharacterStream



InputSource
public InputSource(InputStream byteStream)(Code)
Create a new input source with a byte stream.

Application writers may use setSystemId to provide a base for resolving relative URIs, setPublicId to include a public identifier, and/or setEncoding to specify the object's character encoding.


Parameters:
  byteStream - The raw byte stream containing the document.
See Also:   InputSource.setPublicId
See Also:   InputSource.setSystemId
See Also:   InputSource.setEncoding
See Also:   InputSource.setByteStream
See Also:   InputSource.setCharacterStream



InputSource
public InputSource(Reader characterStream)(Code)
Create a new input source with a character stream.

Application writers may use setSystemId() to provide a base for resolving relative URIs, and setPublicId to include a public identifier.

The character stream shall not include a byte order mark.


See Also:   InputSource.setPublicId
See Also:   InputSource.setSystemId
See Also:   InputSource.setByteStream
See Also:   InputSource.setCharacterStream




Method Detail
getByteStream
public InputStream getByteStream()(Code)
Get the byte stream for this input source.

The getEncoding method will return the character encoding for this byte stream, or null if unknown.

The byte stream, or null if none was supplied.
See Also:   InputSource.getEncoding
See Also:   InputSource.setByteStream



getCharacterStream
public Reader getCharacterStream()(Code)
Get the character stream for this input source. The character stream, or null if none was supplied.
See Also:   InputSource.setCharacterStream



getEncoding
public String getEncoding()(Code)
Get the character encoding for a byte stream or URI. The encoding, or null if none was supplied.
See Also:   InputSource.setByteStream
See Also:   InputSource.getSystemId
See Also:   InputSource.getByteStream



getPublicId
public String getPublicId()(Code)
Get the public identifier for this input source. The public identifier, or null if none was supplied.
See Also:   InputSource.setPublicId



getSystemId
public String getSystemId()(Code)
Get the system identifier for this input source.

The getEncoding method will return the character encoding of the object pointed to, or null if unknown.

If the system ID is a URL, it will be fully resolved.

The system identifier.
See Also:   InputSource.setSystemId
See Also:   InputSource.getEncoding



setByteStream
public void setByteStream(InputStream byteStream)(Code)
Set the byte stream for this input source.

The SAX 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 it with the setEncoding method.


Parameters:
  byteStream - A byte stream containing an XML document orother entity.
See Also:   InputSource.setEncoding
See Also:   InputSource.getByteStream
See Also:   InputSource.getEncoding
See Also:   java.io.InputStream



setCharacterStream
public void setCharacterStream(Reader characterStream)(Code)
Set the character stream for this input source.

If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.


Parameters:
  characterStream - The character stream containing theXML document or other entity.
See Also:   InputSource.getCharacterStream
See Also:   java.io.Reader



setEncoding
public void setEncoding(String encoding)(Code)
Set the character encoding, if known.

The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML 1.0 recommendation).

This method has no effect when the application provides a character stream.


Parameters:
  encoding - A string describing the character encoding.
See Also:   InputSource.setSystemId
See Also:   InputSource.setByteStream
See Also:   InputSource.getEncoding



setPublicId
public void setPublicId(String publicId)(Code)
Set 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.


Parameters:
  publicId - The public identifier as a string.
See Also:   InputSource.getPublicId
See Also:   org.xml.sax.Locator.getPublicId
See Also:   org.xml.sax.SAXParseException.getPublicId



setSystemId
public void setSystemId(String systemId)(Code)
Set the system identifier 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 open a connection to the URI 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 using the setEncoding method.

If the system ID is a URL, it must be fully resolved.


Parameters:
  systemId - The system identifier as a string.
See Also:   InputSource.setEncoding
See Also:   InputSource.getSystemId
See Also:   org.xml.sax.Locator.getSystemId
See Also:   org.xml.sax.SAXParseException.getSystemId



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.