Inherited by seda.nbio.NonblockingSocketOutputStream.
The various write() methods are blocking, while the nbWrite() methods are nonblocking. It was necessary to introduce new methods as the original write() calls return void, and hence there is no way to indicate that only a portion of the request was written.
Public Member Functions | |
abstract void | write (int b) throws IOException |
Perform a blocking write of one byte to this output stream. | |
abstract void | write (byte b[]) throws IOException |
Perform a blocking write of b.length bytes to the underlying stream. | |
abstract void | write (byte b[], int off, int len) throws IOException |
Perform a blocking write of len bytes to the underlying stream from the byte array b starting at offset off . | |
abstract int | nbWrite (byte b) throws IOException |
Perform a non-blocking write of one byte to this output stream. | |
abstract int | nbWrite (byte b[]) throws IOException |
Perform a nonblocking write of up to b.length bytes to the underlying stream. | |
abstract int | nbWrite (byte b[], int off, int len) throws IOException |
Perform a nonblocking write of up to len bytes to the underlying stream starting at offset off . | |
abstract void | flush () |
Flush the underlying output stream. | |
abstract void | close () throws IOException |
abstract void seda.nbio.NonblockingOutputStream.write | ( | int | b | ) | throws IOException [pure virtual] |
Perform a blocking write of one byte to this output stream.
Throws an EOFException if the end of stream has been reached. Use nbWrite() to perform a non-blocking write of one byte.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract void seda.nbio.NonblockingOutputStream.write | ( | byte | b[] | ) | throws IOException [pure virtual] |
Perform a blocking write of b.length
bytes to the underlying stream.
Use nbWrite() to perform a nonblocking write.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract void seda.nbio.NonblockingOutputStream.write | ( | byte | b[], | |
int | off, | |||
int | len | |||
) | throws IOException [pure virtual] |
Perform a blocking write of len
bytes to the underlying stream from the byte array b
starting at offset off
.
Use nbWrite() to perform a nonblocking write.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract int seda.nbio.NonblockingOutputStream.nbWrite | ( | byte | b | ) | throws IOException [pure virtual] |
Perform a non-blocking write of one byte to this output stream.
Returns 1 if the data was written or 0 if it could not be. Throws an EOFException if the end of the stream has been reached. Use write() to perform a blocking write of one byte.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract int seda.nbio.NonblockingOutputStream.nbWrite | ( | byte | b[] | ) | throws IOException [pure virtual] |
Perform a nonblocking write of up to b.length
bytes to the underlying stream.
Returns the number of bytes written, or 0 if nothing was written. Use write() to perform a blocking write.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract int seda.nbio.NonblockingOutputStream.nbWrite | ( | byte | b[], | |
int | off, | |||
int | len | |||
) | throws IOException [pure virtual] |
Perform a nonblocking write of up to len
bytes to the underlying stream starting at offset off
.
Returns the number of bytes written, or 0 if nothing was written. Use write() to perform a blocking write.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract void seda.nbio.NonblockingOutputStream.flush | ( | ) | [pure virtual] |
Flush the underlying output stream.
This is a blocking operation.
Implemented in seda.nbio.NonblockingSocketOutputStream.
abstract void seda.nbio.NonblockingOutputStream.close | ( | ) | throws IOException [pure virtual] |
Implemented in seda.nbio.NonblockingSocketOutputStream.