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:
Closeable,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
ConstructorsConstructorDescriptionDeferredFileBufferingInputStream(InputStream sourceInputStream, long sourceSize, int maxInMemoryBufferSize, File tmpDirectory) -
Method Summary
Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skip, unwrapMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
DeferredFileBufferingInputStream
public DeferredFileBufferingInputStream(InputStream sourceInputStream, long sourceSize, int maxInMemoryBufferSize, File tmpDirectory) throws IOException - Throws:
IOException
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-