org.glassfish.grizzly.streams
Class StreamOutput
java.lang.Object
org.glassfish.grizzly.streams.StreamOutput
- All Implemented Interfaces:
- Output
public class StreamOutput
- extends java.lang.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 java.io.IOException
- Specified by:
write in interface Output
- Throws:
java.io.IOException
write
public void write(Buffer buffer)
throws java.io.IOException
- Specified by:
write in interface Output
- Throws:
java.io.IOException
isBuffered
public boolean isBuffered()
- Specified by:
isBuffered in interface Output
ensureBufferCapacity
public void ensureBufferCapacity(int size)
throws java.io.IOException
- Specified by:
ensureBufferCapacity in interface Output
- Throws:
java.io.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<java.lang.Integer> flush(CompletionHandler<java.lang.Integer> completionHandler)
throws java.io.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:
java.io.IOException
close
public GrizzlyFuture<java.lang.Integer> close(CompletionHandler<java.lang.Integer> completionHandler)
throws java.io.IOException
- Description copied from interface:
Output
- Close the
StreamWriter and make sure all data was flushed.
- Specified by:
close in interface Output
- Throws:
java.io.IOException
Copyright © 2011 Oracle Corpration. All Rights Reserved.