|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.transport.TransportSender
public class TransportSender
The TransportSender object is used to send bytes to
and underlying transport. This is essentially an adapter between
an OutputStream and the underlying transport. Each
byte array segment written to the underlying transport is wrapped
in a bytes buffer so that it can be sent by the transport layer.
Transport| Constructor Summary | |
|---|---|
TransportSender(Transport transport)
Constructor for the TransportSender object. |
|
| Method Summary | |
|---|---|
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 |
send(byte[] array)
This method is used to deliver the provided array of bytes to the underlying transport. |
void |
send(byte[] array,
int off,
int len)
This method is used to deliver the provided array of bytes to the underlying transport. |
void |
send(ByteBuffer buffer)
This method is used to deliver the provided buffer of bytes to the underlying transport. |
void |
send(ByteBuffer buffer,
int off,
int len)
This method is used to deliver the provided buffer of bytes to the underlying transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransportSender(Transport transport)
TransportSender object. This
is used to create an adapter for the transport such that a
byte array can be used to write bytes to the array.
transport - the underlying transport to send bytes to| Method Detail |
|---|
public void send(byte[] array)
throws IOException
send in interface Senderarray - this is the array of bytes to send to the client
IOException
public void send(byte[] array,
int off,
int len)
throws IOException
send in interface Senderarray - 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 sent
IOException
public void send(ByteBuffer buffer)
throws IOException
send in interface Senderbuffer - this is the buffer of bytes to send to the client
IOException
public void send(ByteBuffer buffer,
int off,
int len)
throws IOException
send in interface Senderbuffer - 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 sent
IOException
public void flush()
throws IOException
flush in interface SenderIOException
public void close()
throws IOException
close in interface SenderIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||