|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents an input source for data.
This interface 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), a base URI, and/or a character stream.
The exact definitions of a byte stream and a character stream are binding dependent.
The application is expected to provide objects that implement this
interface whenever such objects are needed. The application can either
provide its own objects that implement this interface, or it can use the
generic factory method DOMImplementationLS.createDOMInput()
to create objects that implement this interface.
The DOMParser
will use the DOMInput
object to
determine how to read data. The DOMParser
will look at the
different inputs specified in the DOMInput
in the following
order to know which one to read from, the first one through which data is
available will be used:
DOMInput.characterStream
DOMInput.byteStream
DOMInput.stringData
DOMInput.systemId
DOMInput.publicId
DOMInput
objects belong to the application. The DOM
implementation will never modify them (though it may make copies and
modify the copies, if necessary).
See also the Document Object Model (DOM) Level 3 Load and Save Specification.
Method Summary | |
java.lang.String |
getBaseURI()
The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI. |
java.io.InputStream |
getByteStream()
An attribute of a language and binding dependent type that represents a stream of bytes. |
boolean |
getCertified()
If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1]. |
java.io.Reader |
getCharacterStream()
An attribute of a language and binding dependent type that represents a stream of 16-bit units. |
java.lang.String |
getEncoding()
The character encoding, if known. |
java.lang.String |
getPublicId()
The public identifier for this input source. |
java.lang.String |
getStringData()
String data to parse. |
java.lang.String |
getSystemId()
The system identifier, a URI reference [IETF RFC 2396], for this input source. |
void |
setBaseURI(java.lang.String baseURI)
The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for resolving a relative systemId to an absolute URI. |
void |
setByteStream(java.io.InputStream byteStream)
An attribute of a language and binding dependent type that represents a stream of bytes. |
void |
setCertified(boolean certified)
If set to true, assume that the input is certified (see section 2.13 in [XML 1.1]) when parsing [XML 1.1]. |
void |
setCharacterStream(java.io.Reader characterStream)
An attribute of a language and binding dependent type that represents a stream of 16-bit units. |
void |
setEncoding(java.lang.String encoding)
The character encoding, if known. |
void |
setPublicId(java.lang.String publicId)
The public identifier for this input source. |
void |
setStringData(java.lang.String stringData)
String data to parse. |
void |
setSystemId(java.lang.String systemId)
The system identifier, a URI reference [IETF RFC 2396], for this input source. |
Method Detail |
public java.io.Reader getCharacterStream()
public void setCharacterStream(java.io.Reader characterStream)
public java.io.InputStream getByteStream()
public void setByteStream(java.io.InputStream byteStream)
public java.lang.String getStringData()
public void setStringData(java.lang.String stringData)
public java.lang.String getSystemId()
DOMParser
will only attempt to fetch the resource
identified by the URI reference only if there is no other input
available in the input source).
encoding
attribute.
baseURI
as the base, if that fails, the behavior is
implementation dependent.public void setSystemId(java.lang.String systemId)
DOMParser
will only attempt to fetch the resource
identified by the URI reference only if there is no other input
available in the input source).
encoding
attribute.
baseURI
as the base, if that fails, the behavior is
implementation dependent.public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
public java.lang.String getPublicId()
public void setPublicId(java.lang.String publicId)
public java.lang.String getBaseURI()
systemId
to an absolute URI.
public void setBaseURI(java.lang.String baseURI)
systemId
to an absolute URI.
public boolean getCertified()
public void setCertified(boolean certified)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |