public interface ByteWriter
ByteWriter
object is used to send data over the TCP
transport. This provides direct contact with the connected socket.
Delivery over a sender implementation can be either SSL based or
direct. It is the responsibility of the implementation to provide
such behavior as required.Modifier and Type | Method and Description |
---|---|
void |
close()
This is used to close the sender and the underlying transport.
|
void |
flush()
This method is used to flush the contents of the buffer to
the client.
|
void |
write(byte[] array)
This method is used to deliver the provided array of bytes to
the underlying transport.
|
void |
write(byte[] array,
int off,
int len)
This method is used to deliver the provided array of bytes to
the underlying transport.
|
void |
write(ByteBuffer buffer)
This method is used to deliver the provided buffer of bytes to
the underlying transport.
|
void |
write(ByteBuffer buffer,
int off,
int len)
This method is used to deliver the provided buffer of bytes to
the underlying transport.
|
void write(byte[] array) throws IOException
array
- this is the array of bytes to send to the clientIOException
void write(byte[] array, int off, int len) throws IOException
array
- this is the array of bytes to send to the clientoff
- this is the offset within the array to send fromlen
- this is the number of bytes that are to be sentIOException
void write(ByteBuffer buffer) throws IOException
buffer
- this is the buffer of bytes to send to the clientIOException
void write(ByteBuffer buffer, int off, int len) throws IOException
buffer
- this is the buffer of bytes to send to the clientoff
- this is the offset within the buffer to send fromlen
- this is the number of bytes that are to be sentIOException
void flush() throws IOException
IOException
void close() throws IOException
IOException
Copyright © 2016. All rights reserved.