class MuxInputStream extends InputStream
Modifier and Type | Field and Description |
---|---|
private int |
inBufPos |
private Deque<ByteBuffer> |
inBufQueue |
private int |
inBufRemaining |
private boolean |
inClosed |
private boolean |
inEOF |
private Mux |
mux |
private boolean |
sentAcknowledgment |
private Session |
session |
private IOException |
sessionDown |
private Object |
sessionLock |
Constructor and Description |
---|
MuxInputStream(Mux mux,
Session session,
Object sessionLock) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
appendToBufQueue(ByteBuffer data) |
int |
available() |
private void |
checkInboundRation()
Sends ration increment, if read drained buffers below
a certain mark.
|
void |
close() |
(package private) void |
down(IOException e) |
(package private) int |
getBufRemaining() |
(package private) boolean |
isClosed() |
(package private) boolean |
isSentAcknowledgment() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
(package private) void |
setBufRemaining(int inBufRemaining) |
(package private) void |
setEOF(boolean inEOF) |
private IOException |
wrap(String message,
Exception e) |
mark, markSupported, read, reset, skip
private final Object sessionLock
private final Session session
private final Mux mux
private final Deque<ByteBuffer> inBufQueue
private IOException sessionDown
private int inBufRemaining
private int inBufPos
private boolean inEOF
private boolean inClosed
private boolean sentAcknowledgment
void down(IOException e)
void appendToBufQueue(ByteBuffer data)
public int read() throws IOException
read
in class InputStream
IOException
private IOException wrap(String message, Exception e)
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
private void checkInboundRation()
public int available() throws IOException
available
in class InputStream
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
boolean isSentAcknowledgment()
int getBufRemaining()
boolean isClosed()
void setBufRemaining(int inBufRemaining)
inBufRemaining
- the inBufRemaining to setvoid setEOF(boolean inEOF)
inEOF
- the inEOF to setCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.