3.6 InputSource

The InputSource interface allows a SAX application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, a byte stream (possibly with a specified encoding), and/or a character stream.

There are two places that the application will deliver this input source to the parser: as the argument to the Parser.parse method, or as the return value of the EntityResolver.resolveEntity method.

An InputSource object belongs to the application: the SAX parser shall never modify it in any way. It can only modify a copy, if necessary.

This interface diverges from the Java interface because of the lack of a common stream functionality in C++.

The primary divergence is the readByteChunk method which the SAX parser can call to read a chunk of the data stream at a time.

DirXML provides an implementation with the C++ InputSourceImpl class accessed through the interface.h file.