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<Integer>close(CompletionHandler<Integer> completionHandler)Close theStreamWriterand make sure all data was flushed.voidensureBufferCapacity(int size)GrizzlyFuture<Integer>flush(CompletionHandler<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 IOException- Specified by:
writein interfaceOutput- Throws:
IOException
-
write
public void write(Buffer buffer) throws IOException
- Specified by:
writein interfaceOutput- Throws:
IOException
-
isBuffered
public boolean isBuffered()
- Specified by:
isBufferedin interfaceOutput
-
ensureBufferCapacity
public void ensureBufferCapacity(int size) throws IOException- Specified by:
ensureBufferCapacityin interfaceOutput- Throws:
IOException
-
getBuffer
public Buffer getBuffer()
Description copied from interface:OutputReturn the Input'sBuffer.
-
flush
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler) throws IOException
Description copied from interface:OutputMake sure that all data that has been written is flushed from the stream to its destination.- Specified by:
flushin interfaceOutput- Throws:
IOException
-
close
public GrizzlyFuture<Integer> close(CompletionHandler<Integer> completionHandler) throws IOException
Description copied from interface:OutputClose theStreamWriterand make sure all data was flushed.- Specified by:
closein interfaceOutput- Throws:
IOException
-
-