|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.afp.AFPResourceManager
public class AFPResourceManager
Manages the creation and storage of document resources
Constructor Summary | |
---|---|
AFPResourceManager(InternalResourceResolver resourceResolver)
Main constructor |
Method Summary | |
---|---|
DataStream |
createDataStream(AFPPaintingState paintingState,
java.io.OutputStream outputStream)
Sets the outputstream |
void |
createIncludedResource(java.lang.String resourceName,
AFPResourceAccessor 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,
AFPResourceAccessor accessor,
byte resourceObjectType,
boolean truetype,
java.lang.String ttc)
Creates an included resource object by loading the contained object from a file. |
void |
createIncludedResourceFromExternal(java.lang.String resourceName,
java.net.URI uri,
AFPResourceAccessor 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. |
boolean |
includeCachedObject(AFPResourceInfo resourceInfo,
AFPObjectAreaInfo areaInfo)
|
boolean |
isObjectCached(AFPResourceInfo resourceInfo)
Returns true if the passed AFPResourceInfo instance is already cached. |
void |
setDefaultResourceGroupUri(java.net.URI uri)
Sets the default resource group URI. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AFPResourceManager(InternalResourceResolver resourceResolver)
resourceResolver
- the associated InternalResourceResolver
instanceMethod Detail |
---|
public DataStream createDataStream(AFPPaintingState paintingState, java.io.OutputStream outputStream) throws java.io.IOException
paintingState
- the AFP painting stateoutputStream
- the outputstream
java.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 setDefaultResourceGroupUri(java.net.URI uri)
uri
- the default resource group URIpublic boolean tryIncludeObject(AFPDataObjectInfo dataObjectInfo) throws java.io.IOException
dataObjectInfo
- the data object info
java.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 info
java.io.IOException
- thrown if an I/O exception of some sort has occurred.public boolean isObjectCached(AFPResourceInfo resourceInfo)
true
if the passed AFPResourceInfo
instance is already cached.
resourceInfo
- the resource info to check
true
if the object is cachedpublic boolean includeCachedObject(AFPResourceInfo resourceInfo, AFPObjectAreaInfo areaInfo)
resourceInfo
- the resource info to checkareaInfo
- the area info to check
true
if ...public void embedFont(AFPFont afpFont, CharacterSet charSet) throws java.io.IOException
afpFont
- the AFP font to be checked for embeddingcharSet
- the associated character set
java.io.IOException
- if there's a problem while embedding the external resourcespublic void createIncludedResource(java.lang.String resourceName, AFPResourceAccessor 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, AFPResourceAccessor accessor, byte resourceObjectType, boolean truetype, java.lang.String ttc) 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, AFPResourceAccessor accessor) throws java.io.IOException
resourceName
- the name of the resourceuri
- the URI for the resourceaccessor
- resource accessor to access the resource with
java.io.IOException
- if an I/O error occurs while loading the resourcepublic void setResourceLevelDefaults(AFPResourceLevelDefaults defaults)
defaults
- the new defaultspublic AFPResourceLevelDefaults getResourceLevelDefaults()
|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |