Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`StreamCacheFactory(boolean cacheToFile)` Creates a new StreamCacheFactory.

Method Summary
`StreamCache` | `createStreamCache()` Get the correct implementation (based on cacheToFile) of StreamCache.
`StreamCache` | `createStreamCache(int hintSize)` Get the correct implementation (based on cacheToFile) of StreamCache.
`boolean` | `getCacheToFile()` Get the value of the global cacheToFile flag.
`static StreamCacheFactory` | `getInstance()` Returns an instance of a StreamCacheFactory depending on the default setting for cacheToFile.
`static StreamCacheFactory` | `getInstance(boolean cacheToFile)` Returns an instance of a StreamCacheFactory with the requested features.
`static void` | `setDefaultCacheToFile(boolean cacheToFile)` Sets the global default for cacheToFile

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StreamCacheFactory

    public StreamCacheFactory(boolean cacheToFile)

  Creates a new StreamCacheFactory.

  Parameters:
    `cacheToFile` - True if file shall be cached using a temporary file

Method Detail

### getInstance

    public static StreamCacheFactory getInstance(boolean cacheToFile)

  Returns an instance of a StreamCacheFactory with the requested features.

  Parameters:
    `cacheToFile` - True if file shall be cached using a temporary file
  Returns:
    StreamCacheFactory the requested factory

### getInstance

    public static StreamCacheFactory getInstance()

  Returns an instance of a StreamCacheFactory depending on the default setting for cacheToFile.

  Returns:
    StreamCacheFactory the requested factory

### setDefaultCacheToFile

    public static void setDefaultCacheToFile(boolean cacheToFile)

  Sets the global default for cacheToFile

  Parameters:
    `cacheToFile` - True if stream caches should be held in files.

### 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

### getCacheToFile

    public boolean getCacheToFile()

  Get the value of the global cacheToFile flag.

  Returns:
    the current cache to file flag

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.