public interface Writable
Writable is a contract to make an entity writable to some
destination; may be a network socket, output stream etc.| Modifier and Type | Method and Description |
|---|---|
long |
writeTo(OutputStream os)
Write to an
OutputStream |
long |
writeTo(Socket socket)
Write this entity to a network socket.
|
long |
writeTo(SocketChannel socketChannel)
Write this entity to a
SocketChannel |
long writeTo(Socket socket) throws IOException
socket - network socket on which bytes will be writtenIOException - if any IO error occurredlong writeTo(SocketChannel socketChannel) throws IOException
SocketChannelsocketChannel - network socket channelIOException - if any IO error occurred while writing byteslong writeTo(OutputStream os) throws IOException
OutputStreamos - OutputStream insatnceIOException - if IO error occurrsCopyright © 2019. All rights reserved.