@Contract(threading=SAFE) public interface DataStreamChannel extends StreamChannel<ByteBuffer>
Implementations are expected to be thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
endStream(List<? extends Header> trailers)
Terminates the underlying data stream and optionally writes
a closing sequence with the given trailers.
|
void |
requestOutput()
Signals intent by the data producer to produce more data.
|
int |
write(ByteBuffer src)
Writes data from the buffer through this channel into the underlying byte stream.
|
endStream
void requestOutput()
int write(ByteBuffer src) throws IOException
requestOutput()
to signal its intent to produce more data.write
in interface StreamChannel<ByteBuffer>
src
- source of dataIOException
- in case of an I/O error.void endStream(List<? extends Header> trailers) throws IOException
Please note that some data streams may not support trailers and may silently ignore the trailers parameter.
IOException
- in case of an I/O error.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.