Package org.glassfish.grizzly.streams
Class StreamOutput
- java.lang.Object
-
- org.glassfish.grizzly.streams.StreamOutput
-
-
Constructor Summary
Constructors Constructor Description StreamOutput(StreamWriter streamWriter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrizzlyFuture<java.lang.Integer>close(CompletionHandler<java.lang.Integer> completionHandler)Close theStreamWriterand make sure all data was flushed.voidensureBufferCapacity(int size)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.BuffergetBuffer()Return the Input'sBuffer.booleanisBuffered()voidwrite(byte data)voidwrite(Buffer buffer)
-
-
-
Constructor Detail
-
StreamOutput
public StreamOutput(StreamWriter streamWriter)
-
-
Method Detail
-
write
public void write(byte data) throws java.io.IOException
-
write
public void write(Buffer buffer) throws java.io.IOException
-
isBuffered
public boolean isBuffered()
- Specified by:
isBufferedin interfaceOutput
-
ensureBufferCapacity
public void ensureBufferCapacity(int size) throws java.io.IOException- Specified by:
ensureBufferCapacityin interfaceOutput- Throws:
java.io.IOException
-
getBuffer
public Buffer getBuffer()
Description copied from interface:OutputReturn the Input'sBuffer.
-
flush
public GrizzlyFuture<java.lang.Integer> flush(CompletionHandler<java.lang.Integer> completionHandler) throws java.io.IOException
Description copied from interface:OutputMake sure that all data that has been written is flushed from the stream to its destination.
-
close
public GrizzlyFuture<java.lang.Integer> close(CompletionHandler<java.lang.Integer> completionHandler) throws java.io.IOException
Description copied from interface:OutputClose theStreamWriterand make sure all data was flushed.
-
-