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 aReceivingDestination
that wraps a suppliedReceiver
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Ask whether this receiver accepts raw output, that is, an arbitrary sequence of items not necessarily forming an XML document or element tree.void
close()
Close the destination, allowing resources to be released.getReceiver
(PipelineConfiguration pipe, SerializationProperties properties) Get aReceiver
to which events may be sent.Methods inherited from class net.sf.saxon.s9api.AbstractDestination
closeAndNotify, getDestinationBaseURI, onClose, setDestinationBaseURI
-
Constructor Details
-
ReceivingDestination
Create aReceivingDestination
that wraps a suppliedReceiver
- Parameters:
target
- the suppliedReceiver
. This must accept a regular event sequence as defined inRegularSequenceChecker
-
-
Method Details
-
getReceiver
Get aReceiver
to 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
Receiver
is an instance ofSequenceNormalizer
- The
Receiver
implementsReceiverWithOutputProperties
, 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:Destination
Close 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
-