Package org.dom4j.io

Class DocumentInputSource


  • class DocumentInputSource
    extends org.xml.sax.InputSource

    DocumentInputSource implements a SAX InputSourcefor a Document.

    Version:
    $Revision: 1.8 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Document document
      The document source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.Reader getCharacterStream()
      Note this method is quite inefficent, it turns the in memory XML tree object model into a single block of text which can then be read by other XML parsers.
      Document getDocument()
      DOCUMENT ME!
      void setCharacterStream​(java.io.Reader characterStream)
      This method is not supported as this source is always a instance.
      void setDocument​(Document document)
      Sets the document used as the SAX InputSource
      • Methods inherited from class org.xml.sax.InputSource

        getByteStream, getEncoding, getPublicId, getSystemId, isEmpty, setByteStream, setEncoding, setPublicId, setSystemId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • document

        private Document document
        The document source
    • Constructor Detail

      • DocumentInputSource

        public DocumentInputSource()
      • DocumentInputSource

        public DocumentInputSource​(Document document)
    • Method Detail

      • getDocument

        public Document getDocument()
        DOCUMENT ME!
        Returns:
        the document which is being used as the SAX InputSource
      • setDocument

        public void setDocument​(Document document)
        Sets the document used as the SAX InputSource
        Parameters:
        document - DOCUMENT ME!
      • setCharacterStream

        public void setCharacterStream​(java.io.Reader characterStream)
                                throws java.lang.UnsupportedOperationException
        This method is not supported as this source is always a instance.
        Overrides:
        setCharacterStream in class org.xml.sax.InputSource
        Parameters:
        characterStream - DOCUMENT ME!
        Throws:
        java.lang.UnsupportedOperationException - as this method is unsupported
      • getCharacterStream

        public java.io.Reader getCharacterStream()
        Note this method is quite inefficent, it turns the in memory XML tree object model into a single block of text which can then be read by other XML parsers. Should only be used with care.
        Overrides:
        getCharacterStream in class org.xml.sax.InputSource
        Returns:
        DOCUMENT ME!