|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectco.cask.cdap.test.internal.DefaultStreamWriter
public final class DefaultStreamWriter
| Constructor Summary | |
|---|---|
DefaultStreamWriter(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.common.queue.QueueName streamName,
String accountId)
|
|
| Method Summary | |
|---|---|
protected void |
finalize()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject
public DefaultStreamWriter(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.common.queue.QueueName streamName,
String accountId)
throws IOException
IOException| Method Detail |
|---|
public void send(String content)
throws IOException
StreamWriter
send in interface StreamWritercontent - Data to be sent.
IOException - If there is error writing to the stream.
public void send(byte[] content)
throws IOException
StreamWritersend(content, 0, content.length).
send in interface StreamWritercontent - Data to be sent.
IOException - If there is error writing to the stream.
public void send(byte[] content,
int off,
int len)
throws IOException
StreamWriter
send in interface StreamWritercontent - 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.
public void send(ByteBuffer buffer)
throws IOException
StreamWriterByteBuffer to the stream.
send in interface StreamWriterbuffer - Data to be sent.
IOException - If there is error writing to the stream.
public void send(Map<String,String> headers,
String content)
throws IOException
StreamWriter
send in interface StreamWriterheaders - Key-value pairs to be sent as
headers of StreamEvent.content - Data to be sent.
IOException - If there is error writing to the stream.
public void send(Map<String,String> headers,
byte[] content)
throws IOException
StreamWritersend(content, 0, content.length).
send in interface StreamWriterheaders - Key-value pairs to be sent as
headers of StreamEvent.content - Data to be sent.
IOException - If there is error writing to the stream.
public void send(Map<String,String> headers,
byte[] content,
int off,
int len)
throws IOException
StreamWriter
send in interface StreamWriterheaders - 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.
public void send(Map<String,String> headers,
ByteBuffer buffer)
throws IOException
StreamWriterByteBuffer to the stream.
send in interface StreamWriterheaders - Key-value pairs to be sent as
headers of StreamEvent.buffer - Data to be sent.
IOException - If there is error writing to the stream.
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||