Package fr.gouv.vitam.workspace.client
Class DeferredFileBufferingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.io.input.ProxyInputStream
-
- fr.gouv.vitam.workspace.client.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.
-
-
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
-
-