Package net.sf.saxon.jaxp
Class ReceivingDestination
java.lang.Object
net.sf.saxon.s9api.AbstractDestination
net.sf.saxon.jaxp.ReceivingDestination
- All Implemented Interfaces:
Destination
An implementation of
Destination that simply wraps a supplied Receiver
The supplied Receiver will be wrapped in a sequence normalizer unless requested
otherwise. Specifically, it is wrapped unless the method acceptsRawOutput()
returns true.
-
Field Summary
Fields inherited from class net.sf.saxon.s9api.AbstractDestination
helper -
Constructor Summary
ConstructorsConstructorDescriptionReceivingDestination(Receiver target) Create aReceivingDestinationthat wraps a suppliedReceiver -
Method Summary
Modifier and TypeMethodDescriptionbooleanAsk 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.getReceiver(PipelineConfiguration pipe, SerializationProperties properties) Get aReceiverto which events may be sent.Methods inherited from class net.sf.saxon.s9api.AbstractDestination
closeAndNotify, getDestinationBaseURI, onClose, setDestinationBaseURI
-
Constructor Details
-
ReceivingDestination
Create aReceivingDestinationthat wraps a suppliedReceiver- Parameters:
target- the suppliedReceiver. This must accept a regular event sequence as defined inRegularSequenceChecker
-
-
Method Details
-
getReceiver
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
-
acceptsRawOutput
public 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
#acceptsRawOutput()is implemented in a subclass ofReceivingDestination, and returns false.
- The
-
close
Description 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
-