Package org.apache.fop.pdf
Class StreamCacheFactory
- java.lang.Object
-
- org.apache.fop.pdf.StreamCacheFactory
-
public final class StreamCacheFactory extends java.lang.Object
This class is serves as a factory from
-
-
Field Summary
Fields Modifier and Type Field Description private static StreamCacheFactory
memoryInstance
-
Constructor Summary
Constructors Modifier Constructor Description private
StreamCacheFactory()
Creates a new StreamCacheFactory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamCache
createStreamCache()
Get the correct implementation (based on cacheToFile) of StreamCache.StreamCache
createStreamCache(int hintSize)
Get the correct implementation (based on cacheToFile) of StreamCache.static StreamCacheFactory
getInstance()
Returns an instance of a StreamCacheFactory with the requested features.
-
-
-
Field Detail
-
memoryInstance
private static StreamCacheFactory memoryInstance
-
-
Method Detail
-
getInstance
public static StreamCacheFactory getInstance()
Returns an instance of a StreamCacheFactory with the requested features.- Returns:
- StreamCacheFactory the requested factory
-
createStreamCache
public StreamCache createStreamCache() throws java.io.IOException
Get the correct implementation (based on cacheToFile) of StreamCache.- Returns:
- a new StreamCache for caching streams
- Throws:
java.io.IOException
- if there is an IO error
-
createStreamCache
public StreamCache createStreamCache(int hintSize) throws java.io.IOException
Get the correct implementation (based on cacheToFile) of StreamCache.- Parameters:
hintSize
- a hint about the approximate expected size of the buffer- Returns:
- a new StreamCache for caching streams
- Throws:
java.io.IOException
- if there is an IO error
-
-