private class Session.MuxOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buffer |
Constructor and Description |
---|
Session.MuxOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private void |
ensureOpen()
This method must ONLY be invoked while synchronized on
this session's lock.
|
void |
flush() |
private void |
waitForIO(IOFuture future)
This method must NOT be invoked while synchronized on
this session's lock.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
private boolean |
writeBuffer(boolean closeIfComplete)
Writes as much of the contents of this stream's output buffer
as is allowed by the current output ration.
|
write
private ByteBuffer buffer
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
private void ensureOpen() throws IOException
IOException
private boolean writeBuffer(boolean closeIfComplete) throws IOException
IOException
private void waitForIO(IOFuture future) throws IOException
IOException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.