public interface StreamWriter
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.