Class Summary : TStreamInputSource

A single stream input source for an XML entity.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

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

An InputSource object belongs to the application: the SAX parser shall never modify it in any way (it may modify a copy if necessary). However, standard processing of both byte and character streams is to close them as part of end-of-parse cleanup, which means that the stream will be freed. Applications should not attempt to re-use such streams after they have been handed to a parser. If StreamOwnership is soOwned then TStreamInputSource frees any streams it has been passed when necassary.


Since : SAX 1.0
See :
IXMLReader.parse(IInputSource)
See : IEntityResolver.resolveEntity

Methods

procedure setByteStream(TStream)
function getByteStream() : TStream


procedure setByteStream( byteStream : TStream);

Set the byte stream for this input source.

The SAX parser will use a byte stream in preference to opening a URI connection itself.

If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.

If the freeByteStream property is true, the StreamInputSource will free any stream it currently contains


Parameter : byteStream A byte stream containing an XML document or other entity.
See : TStreamInputSource.setEncoding
See : TStreamInputSource.getByteStream
See : TStreamInputSource.getEncoding

Top


function getByteStream() : TStream;

Get the byte stream for this input source.

The getEncoding method will return the character encoding for this byte stream, or nil if unknown.


Result : The byte stream, or nil if none was supplied.
See : TStreamInputSource.getEncoding
See : TStreamInputSource.setByteStream

Top