Package org.apache.fop.afp
Class AFPStreamer
java.lang.Object
org.apache.fop.afp.AFPStreamer
- All Implemented Interfaces:
Streamable
Manages the streaming of the AFP output
-
Constructor Summary
ConstructorsConstructorDescriptionAFPStreamer(Factory factory, InternalResourceResolver resourceResolver) Main constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes off the AFP stream writing the document streamcreateDataStream(AFPPaintingState paintingState) Creates a new DataStreamgetResourceGroup(AFPResourceLevel level) Returns the resource group for a given resource infovoidSets the default resource group URI.voidsetOutputStream(OutputStream outputStream) Sets the final outputstreamvoidDataStream objects must implement the writeToStream() method to write its data to the given OutputStream
-
Constructor Details
-
AFPStreamer
Main constructor- Parameters:
factory- a factoryresourceResolver- resource resolver
-
-
Method Details
-
createDataStream
Creates a new DataStream- Parameters:
paintingState- the AFP painting state- Returns:
- a new
DataStream - Throws:
IOException- thrown if an I/O exception of some sort has occurred
-
setDefaultResourceGroupUri
Sets the default resource group URI.- Parameters:
uri- the default resource group URI
-
getResourceGroup
Returns the resource group for a given resource info- Parameters:
level- a resource level- Returns:
- a resource group for the given resource info
-
close
Closes off the AFP stream writing the document stream- Throws:
IOException- if an an I/O exception of some sort has occurred
-
setOutputStream
Sets the final outputstream- Parameters:
outputStream- an outputstream
-
writeToStream
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Specified by:
writeToStreamin interfaceStreamable- Parameters:
os- the outputsteam stream- Throws:
IOException- an I/O exception of some sort has occurred.
-