public class DataSinkStream extends Object implements DataSink
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoFlush |
protected boolean |
ignoreOffset |
protected long |
offset |
protected OutputStream |
out |
| Constructor and Description |
|---|
DataSinkStream(OutputStream out) |
DataSinkStream(OutputStream out,
boolean autoFlush,
boolean ignoreOffset) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this data sink and releases any system
resources associated with this sink.
|
void |
write(Buffer buffer)
Writes the specified buffer to this data sink.
|
protected OutputStream out
protected boolean autoFlush
protected boolean ignoreOffset
protected long offset
public DataSinkStream(OutputStream out)
public DataSinkStream(OutputStream out, boolean autoFlush, boolean ignoreOffset)
public void write(Buffer buffer) throws IOException
DataSinkbuffer.getOffset() might
return -1 if the transfer mode used does not support
data offsets, for example stream transfer mode.write in interface DataSinkbuffer - the data buffer to write.IOException - if an I/O error occurs.public void close()
throws IOException
DataSinkclose in interface DataSinkIOException - if an I/O error occurs.Copyright © 2016. All rights reserved.