class MuxOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buffer |
private boolean |
fakeOKtoWrite |
private Mux |
mux |
private Session |
session |
private IOException |
sessionDown |
private Object |
sessionLock |
Constructor and Description |
---|
MuxOutputStream(Mux mux,
Session session,
Object sessionLock) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
abort() |
void |
close()
Flush method causes deadlock
|
(package private) void |
down(IOException e) |
private void |
ensureOpen()
This method must ONLY be invoked while synchronized on
this session's lock.
|
(package private) void |
handleClose() |
private boolean |
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.
|
flush, write
private final ByteBuffer buffer
private final Object sessionLock
private final Session session
private final Mux mux
private boolean fakeOKtoWrite
private IOException sessionDown
void abort()
void handleClose()
void down(IOException e)
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 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 boolean 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.