public class AFPResourceManager
extends java.lang.Object
| Constructor and Description |
|---|
AFPResourceManager()
Main constructor
|
| Modifier and Type | Method and Description |
|---|---|
DataStream |
createDataStream(AFPPaintingState paintingState,
java.io.OutputStream outputStream)
Sets the outputstream
|
void |
createIncludedResource(java.lang.String resourceName,
ResourceAccessor accessor,
byte resourceObjectType)
Creates an included resource object by loading the contained object from a file.
|
void |
createIncludedResource(java.lang.String resourceName,
java.net.URI uri,
ResourceAccessor accessor,
byte resourceObjectType)
Creates an included resource object by loading the contained object from a file.
|
void |
createIncludedResourceFromExternal(java.lang.String resourceName,
java.net.URI uri,
ResourceAccessor accessor)
Creates an included resource extracting the named resource from an external source.
|
void |
createObject(AFPDataObjectInfo dataObjectInfo)
Creates a new data object in the AFP datastream
|
void |
embedFont(AFPFont afpFont,
CharacterSet charSet)
Handles font embedding.
|
DataStream |
getDataStream()
Returns the AFP DataStream
|
AFPResourceLevelDefaults |
getResourceLevelDefaults()
Returns the resource level defaults in use with this resource manager.
|
void |
setDefaultResourceGroupFilePath(java.lang.String filePath)
Sets the default resource group file path
|
void |
setResourceLevelDefaults(AFPResourceLevelDefaults defaults)
Sets resource level defaults.
|
boolean |
tryIncludeObject(AFPDataObjectInfo dataObjectInfo)
Tries to create an include of a data object that has been previously added to the
AFP data stream.
|
void |
writeToStream()
Tells the streamer to write
|
public DataStream createDataStream(AFPPaintingState paintingState, java.io.OutputStream outputStream) throws java.io.IOException
paintingState - the AFP painting stateoutputStream - the outputstreamjava.io.IOException - thrown if an I/O exception of some sort has occurredpublic DataStream getDataStream()
public void writeToStream()
throws java.io.IOException
java.io.IOException - thrown if an I/O exception of some sort has occurred.public void setDefaultResourceGroupFilePath(java.lang.String filePath)
filePath - the default resource group file pathpublic boolean tryIncludeObject(AFPDataObjectInfo dataObjectInfo) throws java.io.IOException
dataObjectInfo - the data object infojava.io.IOException - thrown if an I/O exception of some sort has occurred.public void createObject(AFPDataObjectInfo dataObjectInfo) throws java.io.IOException
dataObjectInfo - the data object infojava.io.IOException - thrown if an I/O exception of some sort has occurred.public void embedFont(AFPFont afpFont, CharacterSet charSet) throws java.io.IOException
afpFont - the AFP font to be checked for embeddingcharSet - the associated character setjava.io.IOException - if there's a problem while embedding the external resourcespublic void createIncludedResource(java.lang.String resourceName,
ResourceAccessor accessor,
byte resourceObjectType)
throws java.io.IOException
resourceName - the name of the resourceaccessor - resource accessor to access the resource withresourceObjectType - the resource object type (ResourceObject.*)java.io.IOException - if an I/O error occurs while loading the resourcepublic void createIncludedResource(java.lang.String resourceName,
java.net.URI uri,
ResourceAccessor accessor,
byte resourceObjectType)
throws java.io.IOException
resourceName - the name of the resourceuri - the URI for the resourceaccessor - resource accessor to access the resource withresourceObjectType - the resource object type (ResourceObject.*)java.io.IOException - if an I/O error occurs while loading the resourcepublic void createIncludedResourceFromExternal(java.lang.String resourceName,
java.net.URI uri,
ResourceAccessor accessor)
throws java.io.IOException
resourceName - the name of the resourceuri - the URI for the resourceaccessor - resource accessor to access the resource withjava.io.IOException - if an I/O error occurs while loading the resourcepublic void setResourceLevelDefaults(AFPResourceLevelDefaults defaults)
defaults - the new defaultspublic AFPResourceLevelDefaults getResourceLevelDefaults()
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.