Class PullPushCopier


  • public class PullPushCopier
    extends java.lang.Object
    This class copies a document by using the pull interface to read the input document, and the push interface to write the output document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void append()
      Copy the input to the output.
      void copy()
      Copy the input to the output.
      • Methods inherited from class java.lang.Object

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

      • PullPushCopier

        public PullPushCopier​(PullProvider in,
                              Receiver out)
        Create a PullPushCopier
        Parameters:
        in - a PullProvider from which events will be read
        out - a Receiver to which copies of the same events will be written
    • Method Detail

      • copy

        public void copy()
                  throws XPathException
        Copy the input to the output. This method will open the output Receiver before appending to it, and will close it afterwards.
        Throws:
        XPathException - if, for example, the input is not well-formed
      • append

        public void append()
                    throws XPathException
        Copy the input to the output. This method relies on the caller to open the output Receiver before use and to close it afterwards.
        Throws:
        XPathException - if, for example, the input is not well-formed