| java.lang.Object org.apache.xmlgraphics.ps.dsc.ResourceTracker
ResourceTracker | public class ResourceTracker (Code) | | This class is used to track resources in a DSC-compliant PostScript file. The distinction is
made between supplied and needed resources. For the details of this distinction, please see
the DSC specification.
|
getDocumentNeededResources | public Set getDocumentNeededResources()(Code) | | Returns the set of needed resources.
the set of needed resources |
getDocumentSuppliedResources | public Set getDocumentSuppliedResources()(Code) | | Returns the set of supplied resources.
the set of supplied resources |
isResourceSupplied | public boolean isResourceSupplied(PSResource res)(Code) | | Indicates whether a particular resource is supplied, rather than needed.
Parameters: res - the resource true if the resource is registered as being supplied. |
notifyResourceUsageOnPage | public void notifyResourceUsageOnPage(PSResource res)(Code) | | Notifies the resource tracker about the usage of a resource on the current page.
Parameters: res - the resource being used |
notifyResourceUsageOnPage | public void notifyResourceUsageOnPage(Collection resources)(Code) | | Notifies the resource tracker about the usage of resources on the current page.
Parameters: resources - the resources being used |
notifyStartNewPage | public void notifyStartNewPage()(Code) | | Notifies the resource tracker that a new page has been started and that the page resource
set can be cleared.
|
registerNeededResource | public void registerNeededResource(PSResource res)(Code) | | Registers a needed resource. If the same resources is already in the set of supplied
resources, it is ignored, i.e. it is assumed to be supplied.
Parameters: res - the resource |
registerSuppliedResource | public void registerSuppliedResource(PSResource res)(Code) | | Registers a supplied resource. If the same resources is already in the set of needed
resources, it is removed there.
Parameters: res - the resource |
writeResources | public void writeResources(boolean pageLevel, PSGenerator gen) throws IOException(Code) | | Writes a DSC comment for the accumulated used resources, either at page level or
at document level.
Parameters: pageLevel - true if the DSC comment for the page level should be generated, false for the document level (in the trailer) Parameters: gen - the PSGenerator to write the DSC comments with exception: IOException - In case of an I/O problem |
|
|