Package com.saxonica.ee.stream.feed

## Class BufferingFeed

- java.lang.Object
- - net.sf.saxon.event.Outputter
  - - net.sf.saxon.event.ProxyOutputter
    - - com.saxonica.ee.stream.feed.ItemFeed
      - - com.saxonica.ee.stream.feed.BufferingFeed

- All Implemented Interfaces:
    `javax.xml.transform.Result`, `Receiver`

      public class BufferingFeed
      extends ItemFeed

  A BufferingFeed is used to wrap an expression that does not have intrinsic capability to accept streamed input. The expression must have been modified to read its input from a SuppliedParameterReference referring to the dynamic context stack. This feed buffers up the streamed input, and on its close() method calls the wrapped expression having placed the buffered input onto the context stack, from where the expression will now read it.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.event.Outputter

      `pipelineConfiguration, systemId`

    - ### Fields inherited from interface javax.xml.transform.Result

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BufferingFeed​(Expression expr, ItemFeed result, XPathContext context)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `append​(Item item)` | Supply an item to the feed
    `void` | `close()` | Signal the end of the sequence of items

    - ### Methods inherited from class com.saxonica.ee.stream.feed.ItemFeed

      `append, dynamicError, endSelectedParentNode, getContext, getExpression, getResult, getTerminator, hasFailed, open, processItems, setExpression, setHasFailed, setTerminator, startSelectedParentNode`

    - ### Methods inherited from class net.sf.saxon.event.ProxyOutputter

      `attribute, characters, comment, endDocument, endElement, getNextOutputter, namespace, open, processingInstruction, setLocation, setUnparsedEntity, startContent, startDocument, startElement, startElement, usesTypeAnnotations`

    - ### Methods inherited from class net.sf.saxon.event.Outputter

      `getConfiguration, getPipelineConfiguration, getStringReceiver, getSystemId, namespaces, setPipelineConfiguration, setSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.event.Receiver

      `handlesAppend`

- - ### Constructor Detail

    - #### BufferingFeed

          public BufferingFeed​(Expression expr,
                               ItemFeed result,
                               XPathContext context)

  - ### Method Detail

    - #### append

          public void append​(Item item)
                      throws XPathException

      Supply an item to the feed
      Specified by:
        `append` in interface `Receiver`
      Specified by:
        `append` in class `ItemFeed`
      Parameters:
        `item` - the item being fed
      Throws:
        `XPathException` - to report any failure

    - #### close

          public void close()
                     throws XPathException

      Signal the end of the sequence of items
      Specified by:
        `close` in interface `Receiver`
      Overrides:
        `close` in class `ItemFeed`
      Throws:
        `XPathException` - to report any failure