Class StreamCacheFactory


  • public final class StreamCacheFactory
    extends java.lang.Object
    This class is serves as a factory from
    • Constructor Detail

      • StreamCacheFactory

        private StreamCacheFactory()
        Creates a new StreamCacheFactory.
        Parameters:
        cacheToFile - True if file shall be cached using a temporary file
    • 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