public interface DataSink
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
DataSink. |
DataSink |
open(DataSpec dataSpec)
Opens the
DataSink to consume the specified data. |
void |
write(byte[] buffer,
int offset,
int length)
Consumes the provided data.
|
DataSink open(DataSpec dataSpec) throws IOException
DataSink to consume the specified data. Calls to open(DataSpec) and
close() must be balanced.dataSpec - Defines the data to be consumed.DataSink, for convenience.IOExceptionvoid close()
throws IOException
DataSink.IOExceptionvoid write(byte[] buffer,
int offset,
int length)
throws IOException
buffer - The buffer from which data should be consumed.offset - The offset of the data to consume in buffer.length - The length of the data to consume, in bytes.IOException