public class AFPStreamer extends java.lang.Object implements Streamable
Constructor and Description |
---|
AFPStreamer(Factory factory,
InternalResourceResolver resourceResolver)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes off the AFP stream writing the document stream
|
DataStream |
createDataStream(AFPPaintingState paintingState)
Creates a new DataStream
|
ResourceGroup |
getResourceGroup(AFPResourceLevel level)
Returns the resource group for a given resource info
|
void |
setDefaultResourceGroupUri(java.net.URI uri)
Sets the default resource group URI.
|
void |
setOutputStream(java.io.OutputStream outputStream)
Sets the final outputstream
|
void |
writeToStream(java.io.OutputStream os)
DataStream objects must implement the writeToStream()
method to write its data to the given OutputStream
|
public AFPStreamer(Factory factory, InternalResourceResolver resourceResolver)
factory
- a factoryresourceResolver
- resource resolverpublic DataStream createDataStream(AFPPaintingState paintingState) throws java.io.IOException
paintingState
- the AFP painting stateDataStream
java.io.IOException
- thrown if an I/O exception of some sort has occurredpublic void setDefaultResourceGroupUri(java.net.URI uri)
uri
- the default resource group URIpublic ResourceGroup getResourceGroup(AFPResourceLevel level)
level
- a resource levelpublic void close() throws java.io.IOException
java.io.IOException
- if an an I/O exception of some sort has occurredpublic void setOutputStream(java.io.OutputStream outputStream)
outputStream
- an outputstreampublic void writeToStream(java.io.OutputStream os) throws java.io.IOException
writeToStream
in interface Streamable
os
- the outputsteam streamjava.io.IOException
- an I/O exception of some sort has occurred.Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.