|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StreamWriter
This interface defines ways to send data to a stream.
| Method Summary | |
|---|---|
void |
send(byte[] content)
Sends a byte array to the stream. |
void |
send(byte[] content,
int off,
int len)
Sends a byte array to the stream. |
void |
send(ByteBuffer buffer)
Sends the content of a ByteBuffer to the stream. |
void |
send(Map<String,String> headers,
byte[] content)
Sends a byte array to the stream. |
void |
send(Map<String,String> headers,
byte[] content,
int off,
int len)
Sends a byte array to the stream. |
void |
send(Map<String,String> headers,
ByteBuffer buffer)
Sends the content of a ByteBuffer to the stream. |
void |
send(Map<String,String> headers,
String content)
Sends a UTF-8 encoded string to the stream. |
void |
send(String content)
Sends a UTF-8 encoded string to the stream. |
| Method Detail |
|---|
void send(String content)
throws IOException
content - Data to be sent.
IOException - If there is error writing to the stream.
void send(byte[] content)
throws IOException
send(content, 0, content.length).
content - Data to be sent.
IOException - If there is error writing to the stream.
void send(byte[] content,
int off,
int len)
throws IOException
content - Data to be sent.off - Offset in the array to start withlen - Number of bytes to sent starting from off.
IOException - If there is error writing to the stream.
void send(ByteBuffer buffer)
throws IOException
ByteBuffer to the stream.
buffer - Data to be sent.
IOException - If there is error writing to the stream.
void send(Map<String,String> headers,
String content)
throws IOException
headers - Key-value pairs to be sent as
headers of StreamEvent.content - Data to be sent.
IOException - If there is error writing to the stream.
void send(Map<String,String> headers,
byte[] content)
throws IOException
send(content, 0, content.length).
headers - Key-value pairs to be sent as
headers of StreamEvent.content - Data to be sent.
IOException - If there is error writing to the stream.
void send(Map<String,String> headers,
byte[] content,
int off,
int len)
throws IOException
headers - Key-value pairs to be sent as
headers of StreamEvent.content - Data to be sent.off - Offset in the array to start withlen - Number of bytes to sent starting from off.
IOException - If there is error writing to the stream.
void send(Map<String,String> headers,
ByteBuffer buffer)
throws IOException
ByteBuffer to the stream.
headers - Key-value pairs to be sent as
headers of StreamEvent.buffer - Data to be sent.
IOException - If there is error writing to the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||