XMLInputSourcepublic class XMLInputSource extends Object This class represents an input source for an XML document. The
basic properties of an input source are the following:
- public identifier
- system identifier
- byte stream or character stream
-
|
Fields Summary |
---|
protected String | fPublicIdPublic identifier. | protected String | fSystemIdSystem identifier. | protected String | fBaseSystemIdBase system identifier. | protected InputStream | fByteStreamByte stream. | protected Reader | fCharStreamCharacter stream. | protected String | fEncodingEncoding. |
Constructors Summary |
---|
public XMLInputSource(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.
fPublicId = publicId;
fSystemId = systemId;
fBaseSystemId = baseSystemId;
| public XMLInputSource(XMLResourceIdentifier resourceIdentifier)Constructs an input source from a XMLResourceIdentifier
object, leaving resolution of the entity and opening of
the input stream up to the caller.
fPublicId = resourceIdentifier.getPublicId();
fSystemId = resourceIdentifier.getLiteralSystemId();
fBaseSystemId = resourceIdentifier.getBaseSystemId();
| public XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding)Constructs an input source from a byte stream.
fPublicId = publicId;
fSystemId = systemId;
fBaseSystemId = baseSystemId;
fByteStream = byteStream;
fEncoding = encoding;
| public XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding)Constructs an input source from a character stream.
fPublicId = publicId;
fSystemId = systemId;
fBaseSystemId = baseSystemId;
fCharStream = charStream;
fEncoding = encoding;
|
Methods Summary |
---|
public java.lang.String | getBaseSystemId()Returns the base system identifier.
return fBaseSystemId;
| public java.io.InputStream | getByteStream()Returns the byte stream.
return fByteStream;
| public java.io.Reader | getCharacterStream()Returns the character stream.
return fCharStream;
| public java.lang.String | getEncoding()Returns the encoding of the stream, or null if not known.
return fEncoding;
| public java.lang.String | getPublicId()Returns the public identifier.
return fPublicId;
| public java.lang.String | getSystemId()Returns the system identifier.
return fSystemId;
| public void | setBaseSystemId(java.lang.String baseSystemId)Sets the base system identifier.
fBaseSystemId = baseSystemId;
| public void | setByteStream(java.io.InputStream byteStream)Sets the byte stream. If the byte stream is not already opened
when this object is instantiated, then the code that opens the
stream should also set the byte stream on this object. Also, if
the encoding is auto-detected, then the encoding should also be
set on this object.
fByteStream = byteStream;
| public void | setCharacterStream(java.io.Reader charStream)Sets the character stream. If the character stream is not already
opened when this object is instantiated, then the code that opens
the stream should also set the character stream on this object.
Also, the encoding of the byte stream used by the reader should
also be set on this object, if known.
fCharStream = charStream;
| public void | setEncoding(java.lang.String encoding)Sets the encoding of the stream.
fEncoding = encoding;
| public void | setPublicId(java.lang.String publicId)Sets the public identifier.
fPublicId = publicId;
| public void | setSystemId(java.lang.String systemId)Sets the system identifier.
fSystemId = systemId;
|
|