java.lang.Object
org.htmlunit.cyberneko.xerces.xni.parser.XMLInputSource
Represents an input source for an XML document. The basic properties of an input source are:
- Public identifier
- System identifier
- Base system identifier
- Byte stream or character stream
- Encoding
- Author:
- Andy Clark, IBM, Ronald Brill
-
Constructor Summary
ConstructorsConstructorDescriptionXMLInputSource(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.XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding) Constructs an input source from a byte stream.XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding) Constructs an input source from a character stream. -
Method Summary
Modifier and TypeMethodDescriptionReturns the base system identifier.Returns the byte stream.Returns the character stream.Returns the encoding of the stream.Returns the public identifier.Returns the system identifier.voidsetBaseSystemId(String baseSystemId) Sets the base system identifier.voidsetByteStream(InputStream byteStream) Sets the byte stream.voidsetCharacterStream(Reader charStream) Sets the character stream.voidsetEncoding(String encoding) Sets the encoding of the stream.voidsetPublicId(String publicId) Sets the public identifier.voidsetSystemId(String systemId) Sets the system identifier.
-
Constructor Details
-
XMLInputSource
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 knownsystemId- the system identifier (can be relative or absolute)baseSystemId- the base system identifier as a fully expanded URI, if known
-
XMLInputSource
public XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding) Constructs an input source from a byte stream.- Parameters:
publicId- the public identifier, if knownsystemId- the system identifier (can be relative or absolute)baseSystemId- the base system identifier as a fully expanded URI, if knownbyteStream- the byte streamencoding- the encoding of the byte stream, if known
-
XMLInputSource
public XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding) Constructs an input source from a character stream.- Parameters:
publicId- the public identifier, if knownsystemId- the system identifier (can be relative or absolute)baseSystemId- the base system identifier as a fully expanded URI, if knowncharStream- the character streamencoding- the original encoding of the byte stream used by the reader, if known
-
-
Method Details
-
setPublicId
Sets the public identifier.- Parameters:
publicId- the new public identifier
-
getPublicId
Returns the public identifier.- Returns:
- the public identifier, or
nullif not specified
-
setSystemId
Sets the system identifier.- Parameters:
systemId- the new system identifier
-
getSystemId
Returns the system identifier.- Returns:
- the system identifier, or
nullif not specified
-
setBaseSystemId
Sets the base system identifier.- Parameters:
baseSystemId- the new base system identifier
-
getBaseSystemId
Returns the base system identifier.- Returns:
- the base system identifier, or
nullif not specified
-
setByteStream
Sets the byte stream. If the byte stream is not already opened when this object is instantiated, the code opening the stream should set the byte stream here.- Parameters:
byteStream- the new byte stream
-
getByteStream
Returns the byte stream.- Returns:
- the byte stream, or
nullif none is set
-
setCharacterStream
Sets the character stream. If the character stream is not already opened when this object is instantiated, the code opening the stream should set the character stream here.- Parameters:
charStream- the new character stream- See Also:
-
getCharacterStream
Returns the character stream.- Returns:
- the character stream, or
nullif none is set
-
setEncoding
Sets the encoding of the stream.- Parameters:
encoding- the new encoding
-
getEncoding
Returns the encoding of the stream.- Returns:
- the encoding, or
nullif not known
-