| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--org.xml.sax.InputSource
        |
        +--com.icl.saxon.ExtendedInputSource
This class allows a SAXON 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), a character stream, or a file.
Most of the functionality is inherited directly from the SAX InputSource class; the additional functionality offered by ExtendedInputSource is to allow the input source to be specified as a File object or as a DOM Document.
This class also acts as a proxy for the parser: it delivers the stream of SAX events. It therefore has a setXMLReader() method to define which parser to use, and a deliver() method to start the process off. If the input source is a Document, the specified parser is ignored.
| Constructor Summary | |
| ExtendedInputSource()Default constructor | |
| ExtendedInputSource(java.io.File file)Create a new input source from a File. | |
| ExtendedInputSource(org.xml.sax.InputSource in)Create an ExtendedInputSource from an existing InputSource | |
| ExtendedInputSource(java.io.InputStream stream)Create a new input source from a byte stream | |
| ExtendedInputSource(java.io.Reader reader)Create a new input source from a character stream | |
| ExtendedInputSource(java.lang.String systemId)Create a new input source from a System ID | |
| Method Summary | |
| static java.lang.String | createURL(java.io.File file)Create a URL that refers to a given File | 
|  int | getEstimatedLength()Get the estimated length of the file (advisory only; -1 if not known) | 
|  void | setEstimatedLength(int length)Set the estimated length of the file (advisory only) | 
|  void | setFile(java.io.File file)Specify that input is to come from a given File. | 
| Methods inherited from class org.xml.sax.InputSource | 
| getByteStream, getCharacterStream, getEncoding, getPublicId, getSystemId, setByteStream, setCharacterStream, setEncoding, setPublicId, setSystemId | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ExtendedInputSource()
public ExtendedInputSource(java.lang.String systemId)
public ExtendedInputSource(java.io.Reader reader)
public ExtendedInputSource(java.io.InputStream stream)
public ExtendedInputSource(java.io.File file)
Example of use:
 parser.parse(new ExtendedInputSource(new File("test.xml")))
file - A File object identifying the XML input filepublic ExtendedInputSource(org.xml.sax.InputSource in)
| Method Detail | 
public void setFile(java.io.File file)
public void setEstimatedLength(int length)
public int getEstimatedLength()
public static java.lang.String createURL(java.io.File file)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||