InputSource
classin packageorg.xml.sax
public class InputSource
InputSource

Input source for one XML entity.

An InputSource can carry a public identifier, a system identifier, a byte stream, a character stream and an optional encoding. SAX parsers prefer the character stream, then the byte stream, then the system identifier.

Example
import org.xml.sax

input = InputSource("file:/tmp/doc.xml")
input.setEncoding("UTF-8")
Constructors
Modifier and Type Member Description
public InputSource Creates an empty input source.
public InputSource
InputSource(byteStream as InputStream)
Creates an input source from a byte stream.
public InputSource
InputSource(characterStream as TextReader)
Creates an input source from a character stream.
public InputSource
InputSource(systemId as String)
Creates an input source from a system identifier.
Methods
Modifier and Type Member Description
public getByteStream
getByteStream() as InputStream
Returns the byte stream.
public getCharacterStream
getCharacterStream() as TextReader
Returns the character stream.
public getEncoding
getEncoding() as String
Returns the byte-stream or URI encoding.
public getPublicId
getPublicId() as String
Returns the public identifier.
public getSystemId
getSystemId() as String
Returns the system identifier.
public isEmpty
isEmpty() as Boolean
Indicates whether no input information is present.
public setByteStream
setByteStream(byteStream as InputStream) as Void
Sets the byte stream.
public setCharacterStream
setCharacterStream(characterStream as TextReader) as Void
Sets the character stream.
public setEncoding
setEncoding(encoding as String) as Void
Sets the byte-stream or URI encoding.
public setPublicId
setPublicId(publicId as String) as Void
Sets the public identifier.
public setSystemId
setSystemId(systemId as String) as Void
Sets the system identifier.