org.glassfish.grizzly.streams
Class StreamOutput
java.lang.Object
org.glassfish.grizzly.streams.StreamOutput
- All Implemented Interfaces:
- Output
public class StreamOutput
- extends Object
- implements Output
- Author:
- oleksiys
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamOutput
public StreamOutput(StreamWriter streamWriter)
write
public void write(byte data)
throws IOException
- Specified by:
write in interface Output
- Throws:
IOException
write
public void write(Buffer buffer)
throws IOException
- Specified by:
write in interface Output
- Throws:
IOException
isBuffered
public boolean isBuffered()
- Specified by:
isBuffered in interface Output
ensureBufferCapacity
public void ensureBufferCapacity(int size)
throws IOException
- Specified by:
ensureBufferCapacity in interface Output
- Throws:
IOException
getBuffer
public Buffer getBuffer()
- Description copied from interface:
Output
- Return the Input's
Buffer.
- Specified by:
getBuffer in interface Output
- Returns:
- the Input's
Buffer.
flush
public GrizzlyFuture<Integer> flush(CompletionHandler<Integer> completionHandler)
throws IOException
- Description copied from interface:
Output
- Make sure that all data that has been written is
flushed from the stream to its destination.
- Specified by:
flush in interface Output
- Throws:
IOException
close
public GrizzlyFuture<Integer> close(CompletionHandler<Integer> completionHandler)
throws IOException
- Description copied from interface:
Output
- Close the
StreamWriter and make sure all data was flushed.
- Specified by:
close in interface Output
- Throws:
IOException
Copyright © 2012 Oracle Corporation. All Rights Reserved.