Class FileBasedScatterGatherBackingStore
- java.lang.Object
-
- org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ScatterGatherBackingStore
public class FileBasedScatterGatherBackingStore extends Object implements ScatterGatherBackingStore
ScatterGatherBackingStore that is backed by a file.- Since:
- 1.10
-
-
Constructor Summary
Constructors Constructor Description FileBasedScatterGatherBackingStore(File target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcloseForWriting()Closes this backing store for further writing.InputStreamgetInputStream()An input stream that contains the scattered payloadvoidwriteOut(byte[] data, int offset, int length)Writes a piece of payload.
-
-
-
Constructor Detail
-
FileBasedScatterGatherBackingStore
public FileBasedScatterGatherBackingStore(File target) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:ScatterGatherBackingStoreAn input stream that contains the scattered payload- Specified by:
getInputStreamin interfaceScatterGatherBackingStore- Returns:
- An InputStream, should be closed by the caller of this method.
- Throws:
IOException- when something fails
-
closeForWriting
public void closeForWriting() throws IOExceptionDescription copied from interface:ScatterGatherBackingStoreCloses this backing store for further writing.- Specified by:
closeForWritingin interfaceScatterGatherBackingStore- Throws:
IOException- when something fails
-
writeOut
public void writeOut(byte[] data, int offset, int length) throws IOExceptionDescription copied from interface:ScatterGatherBackingStoreWrites a piece of payload.- Specified by:
writeOutin 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
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-