|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DataSink
This interface defines a sink for data, i.e. something that data can be written to.
An OutputStream can be adapted to a data sink using the
OutputStreamToDataSinkAdapter.
DataSource| Method Summary | |
|---|---|
void |
close()
Close the sink and free all resources associated with it. |
void |
flush()
Flush changes made to the sink to the underlying storage. |
void |
write(byte[] barr)
Write the contents of the array to the sink, starting at the current file pointer. |
void |
write(byte[] barr,
int off,
int len)
Write len bytes from the array, starting at the offset off to this sink. |
void |
write(int b)
Write a byte to the sink. |
| Method Detail |
|---|
void write(byte[] barr)
throws ReadOnlyException,
IllegalStateException,
WrappedIOException
barr - The array to write.
ReadOnlyException - If the sink is opened read only.
IllegalStateException - If the sink is closed.
WrappedIOException - On I/O errors.
void write(byte[] barr,
int off,
int len)
throws ReadOnlyException,
IllegalStateException,
WrappedIOException
len bytes from the array, starting at the offset off to this sink.
barr - The byte array.off - The starting offset in the array.len - The number of bytes to write.
ReadOnlyException - If the sink is opened read only.
IllegalStateException - If the sink file is closed.
WrappedIOException - On I/O errors.
void write(int b)
throws ReadOnlyException,
IllegalStateException,
WrappedIOException
b - The byte to write.
ReadOnlyException - If the sink is opened read only.
IllegalStateException - If the random access file is closed.
WrappedIOException - On I/O errors.
void flush()
throws ReadOnlyException,
IllegalStateException,
WrappedIOException
ReadOnlyException.
ReadOnlyException - If the sink is opened read only.
IllegalStateException - If the sink is closed.
WrappedIOException - On I/O errors.
void close()
throws WrappedIOException
WrappedIOException - On I/O errors.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||