Top Description Methods
org.apache.commons.compress.parallel

public Interface ScatterGatherBackingStore

extends Closeable
Known Direct Implementers
org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore
Imports
java.io.Closeable, .IOException, .InputStream

Store intermediate payload in a scatter-gather scenario. Multiple threads write their payload to a backing store, which can subsequently be reversed to an InputStream to be used as input in the gather phase.

It is the responsibility of the allocator of an instance of this class to close this. Closing it should clear off any allocated structures and preferably delete files.

Since
1.10

Method Summary

Modifier and TypeMethod and Description
public void
closeForWriting()

Closes this backing store for further writing.

public InputStream

Returns:

An InputStream, should be closed by the caller of this method.
getInputStream
()

An input stream that contains the scattered payload

public void
writeOut(byte[]
the data to write
data
,
int
offset inside data to start writing from
offset
,
int
the amount of data to write
length
)

Writes a piece of payload.

Inherited from java.io.Closeable:
close

Method Detail

closeForWritingback to summary
public void closeForWriting() throws IOException

Closes this backing store for further writing.

Exceptions
IOException:
when something fails
getInputStreamback to summary
public InputStream getInputStream() throws IOException

An input stream that contains the scattered payload

Returns:InputStream

An InputStream, should be closed by the caller of this method.

Exceptions
IOException:
when something fails
writeOutback to summary
public void writeOut(byte[] data, int offset, int length) throws IOException

Writes a piece of payload.

Parameters
data:byte[]

the data to write

offset:int

offset inside data to start writing from

length:int

the amount of data to write

Exceptions
IOException:
when something fails