org.apache.fop.pdf
Class StreamCacheFactory
java.lang.Object
org.apache.fop.pdf.StreamCacheFactory
public class StreamCacheFactory
extends java.lang.Object
This class is serves as a factory from
StreamCacheFactory
public StreamCacheFactory(boolean cacheToFile)
Creates a new StreamCacheFactory.
cacheToFile
- True if file shall be cached using a temporary file
createStreamCache
public StreamCache createStreamCache()
throws IOException
Get the correct implementation (based on cacheToFile) of
StreamCache.
- a new StreamCache for caching streams
createStreamCache
public StreamCache createStreamCache(int hintSize)
throws IOException
Get the correct implementation (based on cacheToFile) of
StreamCache.
hintSize
- a hint about the approximate expected size of the buffer
- a new StreamCache for caching streams
getCacheToFile
public boolean getCacheToFile()
Get the value of the global cacheToFile flag.
- the current cache to file flag
getInstance
public static StreamCacheFactory getInstance()
Returns an instance of a StreamCacheFactory depending on the default
setting for cacheToFile.
- StreamCacheFactory the requested factory
getInstance
public static StreamCacheFactory getInstance(boolean cacheToFile)
Returns an instance of a StreamCacheFactory with the requested features.
cacheToFile
- True if file shall be cached using a temporary file
- StreamCacheFactory the requested factory
setDefaultCacheToFile
public static void setDefaultCacheToFile(boolean cacheToFile)
Sets the global default for cacheToFile
cacheToFile
- True if stream caches should be held in files.
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.