SAXInputSource.java revision 286
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* <p>An <code>XMLInputSource</code> analogue to <code>javax.xml.transform.sax.SAXSource</code>.</p>
*
*/
public final class SAXInputSource extends XMLInputSource {
private XMLReader fXMLReader;
private InputSource fInputSource;
public SAXInputSource() {
this(null);
}
this(null, inputSource);
}
if (inputSource != null) {
}
fXMLReader = reader;
}
fXMLReader = reader;
}
public XMLReader getXMLReader() {
return fXMLReader;
}
if (inputSource != null) {
}
else {
}
}
public InputSource getInputSource() {
return fInputSource;
}
/**
* Sets the public identifier.
*
* @param publicId The new public identifier.
*/
super.setPublicId(publicId);
if (fInputSource == null) {
fInputSource = new InputSource();
}
} // setPublicId(String)
/**
* Sets the system identifier.
*
* @param systemId The new system identifier.
*/
super.setSystemId(systemId);
if (fInputSource == null) {
fInputSource = new InputSource();
}
} // setSystemId(String)
/**
* 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();
}
} // setByteStream(InputStream)
/**
* 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();
}
} // setCharacterStream(Reader)
/**
* Sets the encoding of the stream.
*
* @param encoding The new encoding.
*/
super.setEncoding(encoding);
if (fInputSource == null) {
fInputSource = new InputSource();
}
} // setEncoding(String)
} // SAXInputSource