public class FileBasedScatterGatherBackingStore extends Object implements ScatterGatherBackingStore
Constructor and Description |
---|
FileBasedScatterGatherBackingStore(File target) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeForWriting()
Closes this backing store for further writing.
|
InputStream |
getInputStream()
An input stream that contains the scattered payload
|
void |
writeOut(byte[] data,
int offset,
int length)
Writes a piece of payload.
|
public FileBasedScatterGatherBackingStore(File target) throws FileNotFoundException
FileNotFoundException
public InputStream getInputStream() throws IOException
ScatterGatherBackingStore
getInputStream
in interface ScatterGatherBackingStore
IOException
- when something failspublic void closeForWriting() throws IOException
ScatterGatherBackingStore
closeForWriting
in interface ScatterGatherBackingStore
IOException
public void writeOut(byte[] data, int offset, int length) throws IOException
ScatterGatherBackingStore
writeOut
in interface ScatterGatherBackingStore
data
- the data to writeoffset
- offset inside data to start writing fromlength
- the amount of data to writeIOException
- when something failspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2015 The Apache Software Foundation. All rights reserved.