|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xerces.dom.DOMInputSourceImpl
This Class DOMInputSourceImpl
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 DOMEntityResolver.resolveEntity
method.
The DOMBuilder
will use the DOMInputSource
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 DOMInputSource
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 DOMInputSource.
See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.
Field Summary | |
protected java.lang.String |
fBaseSystemId
|
protected java.io.InputStream |
fByteStream
|
protected java.io.Reader |
fCharStream
|
protected java.lang.String |
fData
|
protected java.lang.String |
fEncoding
|
protected java.lang.String |
fPublicId
|
protected java.lang.String |
fSystemId
|
Constructor Summary | |
DOMInputSourceImpl()
Default Constructor, constructs an input source |
|
DOMInputSourceImpl(java.lang.String publicId,
java.lang.String systemId,
java.lang.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. |
|
DOMInputSourceImpl(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.io.InputStream byteStream,
java.lang.String encoding)
Constructs an input source from a byte stream. |
|
DOMInputSourceImpl(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.io.Reader charStream,
java.lang.String encoding)
Constructs an input source from a character stream. |
|
DOMInputSourceImpl(java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.lang.String data,
java.lang.String encoding)
Constructs an input source from a String. |
Method Summary | |
java.lang.String |
getBaseURI()
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. |
java.io.InputStream |
getByteStream()
An attribute of a language-binding dependent type that represents a stream of bytes. |
java.io.Reader |
getCharacterStream()
An attribute of a language-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()
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters). |
java.lang.String |
getSystemId()
The system identifier, a URI reference , for this input source. |
void |
setBaseURI(java.lang.String baseURI)
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. |
void |
setByteStream(java.io.InputStream byteStream)
An attribute of a language-binding dependent type that represents a stream of bytes. |
void |
setCharacterStream(java.io.Reader characterStream)
An attribute of a language-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)
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters). |
void |
setSystemId(java.lang.String systemId)
The system identifier, a URI reference , for this input source. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String fPublicId
protected java.lang.String fSystemId
protected java.lang.String fBaseSystemId
protected java.io.InputStream fByteStream
protected java.io.Reader fCharStream
protected java.lang.String fData
protected java.lang.String fEncoding
Constructor Detail |
public DOMInputSourceImpl()
public DOMInputSourceImpl(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.public DOMInputSourceImpl(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.io.InputStream byteStream, java.lang.String encoding)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.byteStream
- The byte stream.encoding
- The encoding of the byte stream, if known.public DOMInputSourceImpl(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.io.Reader charStream, java.lang.String encoding)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.charStream
- The character stream.encoding
- The original encoding of the byte stream
used by the reader, if known.public DOMInputSourceImpl(java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.lang.String data, java.lang.String encoding)
publicId
- The public identifier, if known.systemId
- The system identifier. This value should
always be set, if possible, and can be
relative or absolute. If the system identifier
is relative, then the base system identifier
should be set.baseSystemId
- The base system identifier. This value should
always be set to the fully expanded URI of the
base system identifier, if possible.data
- The String Data.encoding
- The original encoding of the byte stream
used by the reader, if known.Method Detail |
public java.io.InputStream getByteStream()
public void setByteStream(java.io.InputStream byteStream)
public java.io.Reader getCharacterStream()
public void setCharacterStream(java.io.Reader characterStream)
public java.lang.String getStringData()
public void setStringData(java.lang.String stringData)
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 getSystemId()
public void setSystemId(java.lang.String systemId)
public java.lang.String getBaseURI()
public void setBaseURI(java.lang.String baseURI)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |