Class DeferredFileBufferingInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class DeferredFileBufferingInputStream
    extends org.apache.commons.io.input.ProxyInputStream
    An input stream that buffers data in memory for small sizes, and to a temporary file otherwise. Any temporary file will be deleted when stream is closed, or if initialization fails in constructor.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      DeferredFileBufferingInputStream​(java.io.InputStream sourceInputStream, long sourceSize, int maxInMemoryBufferSize, java.io.File tmpDirectory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      • Methods inherited from class org.apache.commons.io.input.ProxyInputStream

        afterRead, available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeferredFileBufferingInputStream

        public DeferredFileBufferingInputStream​(java.io.InputStream sourceInputStream,
                                                long sourceSize,
                                                int maxInMemoryBufferSize,
                                                java.io.File tmpDirectory)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class org.apache.commons.io.input.ProxyInputStream
        Throws:
        java.io.IOException