FileDocCategorySizeDatePackage
SAXInputSource.javaAPI DocApache Xerces 3.0.15528Fri Sep 14 20:33:54 BST 2007org.apache.xerces.util

SAXInputSource

public final class SAXInputSource extends org.apache.xerces.xni.parser.XMLInputSource

An XMLInputSource analogue to javax.xml.transform.sax.SAXSource.

version
$Id: SAXInputSource.java 447241 2006-09-18 05:12:57Z mrglavas $

Fields Summary
private XMLReader
fXMLReader
private InputSource
fInputSource
Constructors Summary
public SAXInputSource()

        this(null);
    
public SAXInputSource(InputSource inputSource)

        this(null, inputSource);
    
public SAXInputSource(XMLReader reader, InputSource inputSource)

        super(inputSource != null ? inputSource.getPublicId() : null, 
                inputSource != null ? inputSource.getSystemId() : null, null);
        if (inputSource != null) {
            setByteStream(inputSource.getByteStream());
            setCharacterStream(inputSource.getCharacterStream());
            setEncoding(inputSource.getEncoding());
        }
        fInputSource = inputSource;
        fXMLReader = reader;
    
Methods Summary
public org.xml.sax.InputSourcegetInputSource()

        return fInputSource;
    
public org.xml.sax.XMLReadergetXMLReader()

        return fXMLReader;
    
public voidsetByteStream(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.

param
byteStream The new byte stream.

        super.setByteStream(byteStream);
        if (fInputSource == null) {
            fInputSource = new InputSource();
        }
        fInputSource.setByteStream(byteStream);
    
public voidsetCharacterStream(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.

param
charStream The new character stream.
see
#setEncoding

        super.setCharacterStream(charStream);
        if (fInputSource == null) {
            fInputSource = new InputSource();
        }
        fInputSource.setCharacterStream(charStream);
    
public voidsetEncoding(java.lang.String encoding)
Sets the encoding of the stream.

param
encoding The new encoding.

        super.setEncoding(encoding);
        if (fInputSource == null) {
            fInputSource = new InputSource();
        }
        fInputSource.setEncoding(encoding);
    
public voidsetInputSource(org.xml.sax.InputSource inputSource)

        if (inputSource != null) {
            setPublicId(inputSource.getPublicId());
            setSystemId(inputSource.getSystemId());
            setByteStream(inputSource.getByteStream());
            setCharacterStream(inputSource.getCharacterStream());
            setEncoding(inputSource.getEncoding());
        }
        else {
            setPublicId(null);
            setSystemId(null);
            setByteStream(null);
            setCharacterStream(null);
            setEncoding(null);
        }
        fInputSource = inputSource;
    
public voidsetPublicId(java.lang.String publicId)
Sets the public identifier.

param
publicId The new public identifier.

        super.setPublicId(publicId);
        if (fInputSource == null) {
            fInputSource = new InputSource();
        }
        fInputSource.setPublicId(publicId);
    
public voidsetSystemId(java.lang.String systemId)
Sets the system identifier.

param
systemId The new system identifier.

        super.setSystemId(systemId);
        if (fInputSource == null) {
            fInputSource = new InputSource();
        }
        fInputSource.setSystemId(systemId);
    
public voidsetXMLReader(org.xml.sax.XMLReader reader)

        fXMLReader = reader;