|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StreamWriter
Write the primitive Java types and arrays of primitives to some data sink. This may include internal buffering for efficiency reasons. Note, that StreamWriter implementation may not be thread-safe.
| Method Summary | ||
|---|---|---|
GrizzlyFuture<java.lang.Integer> |
close(CompletionHandler<java.lang.Integer> completionHandler)
Close the StreamWriter and make sure all data was flushed. |
|
|
encode(Transformer<E,Buffer> encoder,
E object)
|
|
|
encode(Transformer<E,Buffer> encoder,
E object,
CompletionHandler<Stream> completionHandler)
|
|
GrizzlyFuture<java.lang.Integer> |
flush()
Make sure that all data that has been written is flushed from the stream to its destination. |
|
GrizzlyFuture<java.lang.Integer> |
flush(CompletionHandler<java.lang.Integer> completionHandler)
Make sure that all data that has been written is flushed from the stream to its destination. |
|
Connection |
getConnection()
Get the Connection this StreamWriter belongs to. |
|
long |
getTimeout(java.util.concurrent.TimeUnit timeunit)
Get the timeout for StreamWriter I/O operations. |
|
boolean |
isClosed()
Returns true, if StreamReader has been closed, or false otherwise. |
|
void |
setTimeout(long timeout,
java.util.concurrent.TimeUnit timeunit)
Set the timeout for StreamWriter I/O operations. |
|
void |
writeBoolean(boolean data)
Write the boolean value to the StreamWriter. |
|
void |
writeBooleanArray(boolean[] data)
Write the array of boolean values to the StreamWriter. |
|
void |
writeBuffer(Buffer buffer)
Write the Buffer to the StreamWriter. |
|
void |
writeByte(byte data)
Write the byte value to the StreamWriter. |
|
void |
writeByteArray(byte[] data)
Write the array of byte values to the StreamWriter. |
|
void |
writeByteArray(byte[] data,
int offset,
int length)
Write the part of array of byte values to the StreamWriter, using specific offset and length values. |
|
void |
writeChar(char data)
Write the char value to the StreamWriter. |
|
void |
writeCharArray(char[] data)
Write the array of char values to the StreamWriter. |
|
void |
writeDouble(double data)
Write the double value to the StreamWriter. |
|
void |
writeDoubleArray(double[] data)
Write the array of double values to the StreamWriter. |
|
void |
writeFloat(float data)
Write the float value to the StreamWriter. |
|
void |
writeFloatArray(float[] data)
Write the array of float values to the StreamWriter. |
|
void |
writeInt(int data)
Write the int value to the StreamWriter. |
|
void |
writeIntArray(int[] data)
Write the array of int values to the StreamWriter. |
|
void |
writeLong(long data)
Write the long value to the StreamWriter. |
|
void |
writeLongArray(long[] data)
Write the array of long values to the StreamWriter. |
|
void |
writeShort(short data)
Write the short value to the StreamWriter. |
|
void |
writeShortArray(short[] data)
Write the array of short values to the StreamWriter. |
|
| Methods inherited from interface java.io.Closeable |
|---|
close |
| Method Detail |
|---|
boolean isClosed()
GrizzlyFuture<java.lang.Integer> flush()
throws java.io.IOException
java.io.IOException
GrizzlyFuture<java.lang.Integer> flush(CompletionHandler<java.lang.Integer> completionHandler)
throws java.io.IOException
java.io.IOException
GrizzlyFuture<java.lang.Integer> close(CompletionHandler<java.lang.Integer> completionHandler)
throws java.io.IOException
StreamWriter and make sure all data was flushed.
java.io.IOException
void writeBoolean(boolean data)
throws java.io.IOException
data - boolean value.
java.io.IOException
void writeByte(byte data)
throws java.io.IOException
data - byte value.
java.io.IOException
void writeChar(char data)
throws java.io.IOException
data - char value.
java.io.IOException
void writeShort(short data)
throws java.io.IOException
data - short value.
java.io.IOException
void writeInt(int data)
throws java.io.IOException
data - int value.
java.io.IOException
void writeLong(long data)
throws java.io.IOException
data - long value.
java.io.IOException
void writeFloat(float data)
throws java.io.IOException
data - float value.
java.io.IOException
void writeDouble(double data)
throws java.io.IOException
data - double value.
java.io.IOException
void writeBooleanArray(boolean[] data)
throws java.io.IOException
data - array of boolean values.
java.io.IOException
void writeByteArray(byte[] data)
throws java.io.IOException
data - array of byte values.
java.io.IOException
void writeByteArray(byte[] data,
int offset,
int length)
throws java.io.IOException
data - array of byte values.offset - array offset to start from.length - number of bytes to write.
java.io.IOException
void writeCharArray(char[] data)
throws java.io.IOException
data - array of char values.
java.io.IOException
void writeShortArray(short[] data)
throws java.io.IOException
data - array of short values.
java.io.IOException
void writeIntArray(int[] data)
throws java.io.IOException
data - array of int values.
java.io.IOException
void writeLongArray(long[] data)
throws java.io.IOException
data - array of long values.
java.io.IOException
void writeFloatArray(float[] data)
throws java.io.IOException
data - array of float values.
java.io.IOException
void writeDoubleArray(double[] data)
throws java.io.IOException
data - array of double values.
java.io.IOException
void writeBuffer(Buffer buffer)
throws java.io.IOException
Buffer to the StreamWriter.
buffer - Buffer.
java.io.IOException
<E> GrizzlyFuture<Stream> encode(Transformer<E,Buffer> encoder,
E object)
throws java.io.IOException
java.io.IOException
<E> GrizzlyFuture<Stream> encode(Transformer<E,Buffer> encoder,
E object,
CompletionHandler<Stream> completionHandler)
throws java.io.IOException
java.io.IOExceptionConnection getConnection()
Connection this StreamWriter belongs to.
getConnection in interface StreamConnection this StreamWriter belongs to.long getTimeout(java.util.concurrent.TimeUnit timeunit)
timeunit - timeout unit TimeUnit.
void setTimeout(long timeout,
java.util.concurrent.TimeUnit timeunit)
timeout - the timeout for StreamWriter I/O operations.timeunit - timeout unit TimeUnit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||