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
ConstructorDescriptionAFPStreamer
(Factory factory, InternalResourceResolver resourceResolver) Main constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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 infovoid
Sets the default resource group URI.void
setOutputStream
(OutputStream outputStream) Sets the final outputstreamvoid
DataStream 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:
writeToStream
in interfaceStreamable
- Parameters:
os
- the outputsteam stream- Throws:
IOException
- an I/O exception of some sort has occurred.
-