co.cask.cdap.test.internal
Class DefaultStreamWriter
java.lang.Object
co.cask.cdap.test.internal.DefaultStreamWriter
- All Implemented Interfaces:
- StreamWriter
public final class DefaultStreamWriter
- extends Object
- implements StreamWriter
|
Constructor Summary |
DefaultStreamWriter(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.proto.Id.Stream streamId)
|
|
Method Summary |
void |
createStream()
|
protected void |
finalize()
|
void |
send(byte[] content)
|
void |
send(byte[] content,
int off,
int len)
|
void |
send(ByteBuffer buffer)
|
void |
send(Map<String,String> headers,
byte[] content)
|
void |
send(Map<String,String> headers,
byte[] content,
int off,
int len)
|
void |
send(Map<String,String> headers,
ByteBuffer buffer)
|
void |
send(Map<String,String> headers,
String content)
|
void |
send(String content)
|
DefaultStreamWriter
@Inject
public DefaultStreamWriter(co.cask.cdap.data.stream.service.StreamHandler streamHandler,
co.cask.cdap.proto.Id.Stream streamId)
throws IOException
- Throws:
IOException
createStream
public void createStream()
throws IOException
- Specified by:
createStream in interface StreamWriter
- Throws:
IOException
send
public void send(String content)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(byte[] content)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(byte[] content,
int off,
int len)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(ByteBuffer buffer)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(Map<String,String> headers,
String content)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(Map<String,String> headers,
byte[] content)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(Map<String,String> headers,
byte[] content,
int off,
int len)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
send
public void send(Map<String,String> headers,
ByteBuffer buffer)
throws IOException
- Specified by:
send in interface StreamWriter
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.