Package org.dspace.storage.bitstore
Class S3BitStoreService.S3LazyInputStream
java.lang.Object
java.io.InputStream
org.dspace.storage.bitstore.S3BitStoreService.S3LazyInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- S3BitStoreService
This inner class represent an InputStream that uses temporary files to
represent chunk of the object downloaded from S3. When the input stream is
read the class look first to the current chunk and download a new one once if
the current one as been fully read. The class is responsible to close a chunk
as soon as a new one is retrieved, the last chunk is closed when the input
stream itself is closed or the last byte is read (the first of the two)
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
S3LazyInputStream
- Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-