Class FileBasedScatterGatherBackingStore
java.lang.Object
org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ScatterGatherBackingStore
ScatterGatherBackingStore that is backed by a file.
- Since:
- 1.10
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
target
-
os
-
closed
private boolean closed
-
-
Constructor Details
-
FileBasedScatterGatherBackingStore
- Throws:
FileNotFoundException
-
-
Method Details
-
getInputStream
Description copied from interface:ScatterGatherBackingStore
An input stream that contains the scattered payload- Specified by:
getInputStream
in interfaceScatterGatherBackingStore
- Returns:
- An InputStream, should be closed by the caller of this method.
- Throws:
IOException
- when something fails
-
closeForWriting
Description copied from interface:ScatterGatherBackingStore
Closes this backing store for further writing.- Specified by:
closeForWriting
in interfaceScatterGatherBackingStore
- Throws:
IOException
- when something fails
-
writeOut
Description copied from interface:ScatterGatherBackingStore
Writes a piece of payload.- Specified by:
writeOut
in interfaceScatterGatherBackingStore
- Parameters:
data
- the data to writeoffset
- offset inside data to start writing fromlength
- the amount of data to write- Throws:
IOException
- when something fails
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-