InputSource

   

InputSource

The parser uses this class to read entities. In most cases, the application creates an InputSource with one of its four constructors. The constructors with InputStream and Reader are particularly useful:

  • InputSource() ”Default constructor.

  • InputSource(InputStream byteStream) ”The source is an InputStream .

  • InputSource(Reader characterStream) ”The source is a character reader.

  • InputSource(String systemId) ”The source is a URI that the parser must resolve.

InputSource also defines the following methods . They read the entity:

  • void setByteStream(InputStream byteStream) / InputStream getByteStream() ”Get the InputStream for this input source

  • void setCharacterStream(Reader characterStream) / Reader getCharacterStream() ”Get the reader for this input source

  • void setEncoding(String encoding) / String getEncoding() ”Get the character encoding for the InputStream or URI

  • void setPublicId(String publicId) / String getPublicId() ”Get the public identifier for this entity

  • void setSystemId(String systemId) / String getSystemId() ”Get the system identifier for this entity

   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net