Package net.sf.saxon.jaxp
Class ReceivingDestination
- java.lang.Object
- 
- net.sf.saxon.s9api.AbstractDestination
- 
- net.sf.saxon.jaxp.ReceivingDestination
 
 
- 
- All Implemented Interfaces:
- Destination
 
 public class ReceivingDestination extends AbstractDestination An implementation ofDestinationthat simply wraps a suppliedReceiverThe supplied Receiverwill be wrapped in a sequence normalizer unless requested otherwise. Specifically, it is wrapped unless the methodacceptsRawOutput()returns true.
- 
- 
Field Summary- 
Fields inherited from class net.sf.saxon.s9api.AbstractDestinationhelper
 
- 
 - 
Constructor SummaryConstructors Constructor Description ReceivingDestination(Receiver target)Create aReceivingDestinationthat wraps a suppliedReceiver
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsRawOutput()Ask whether this receiver accepts raw output, that is, an arbitrary sequence of items not necessarily forming an XML document or element tree.voidclose()Close the destination, allowing resources to be released.ReceivergetReceiver(PipelineConfiguration pipe, SerializationProperties properties)Get aReceiverto which events may be sent.- 
Methods inherited from class net.sf.saxon.s9api.AbstractDestinationcloseAndNotify, getDestinationBaseURI, onClose, setDestinationBaseURI
 
- 
 
- 
- 
- 
Constructor Detail- 
ReceivingDestinationpublic ReceivingDestination(Receiver target) Create aReceivingDestinationthat wraps a suppliedReceiver- Parameters:
- target- the supplied- Receiver. This must accept a regular event sequence as defined in- RegularSequenceChecker
 
 
- 
 - 
Method Detail- 
getReceiverpublic Receiver getReceiver(PipelineConfiguration pipe, SerializationProperties properties) Get aReceiverto which events may be sent. For this implementation, this will be the wrappedReceiver.- Parameters:
- pipe- The Saxon configuration. Not used in this implementation.
- properties- The required serialization properties (not used)
- Returns:
- the wrapped Receiver
 
 - 
acceptsRawOutputpublic boolean acceptsRawOutput() Ask whether this receiver accepts raw output, that is, an arbitrary sequence of items not necessarily forming an XML document or element tree. May be overridden in a subclass.- Returns:
- false unless one of the following conditions is true:
  - The Receiveris an instance ofSequenceNormalizer
- The ReceiverimplementsReceiverWithOutputProperties, and a call ongetOutputProperties(SaxonOutputPropertes.REQUIRE_WELL_FORMED)returns "no"
- The method {#acceptRawOutput()} is implemented in a subclass of ReceivingDestination, and returns false.
 
- The 
 
 - 
closepublic void close() throws SaxonApiExceptionDescription copied from interface:DestinationClose the destination, allowing resources to be released. Saxon calls this method when it has finished writing to the destination.The close()method should not cause any adverse effects if it is called more than once. If any other method is called after theclose()call, the results are undefined. This means that a Destination is not, in general, serially reusable.If an Destination.onClose(net.sf.saxon.s9api.Action)action has been associated with the destination, this will be called after the destination is closed.- Throws:
- SaxonApiException- if any failure occurs
 
 
- 
 
-