public abstract class FrameInputStream extends java.io.InputStream implements WebSocketConstants
+-+------+---------+-+---------+
|F|xxx(3)|opcode(4)|R|len(7) |
+-+------+---------+-+---------+
OPCODES
0 - cont
1 - close
2 - ping
3 - pong
4 - text
5 - binary
CLOSE_ERROR, CLOSE_MESSAGE_TOO_BIG, CLOSE_OK, CLOSE_UTF8, FLAG_FIN, FLAG_MASK, MASK_OPCODE, OP_BINARY, OP_CLOSE, OP_CONT, OP_PING, OP_PONG, OP_TEXT, VERSION
Constructor and Description |
---|
FrameInputStream() |
Modifier and Type | Method and Description |
---|---|
void |
closeError(int i,
java.lang.String msg) |
WebSocketContext |
getContext() |
abstract long |
getLength() |
abstract int |
getOpcode() |
protected boolean |
handleFrame() |
void |
init(WebSocketContext cxt,
java.io.InputStream is) |
WebSocketReader |
initReader(long length,
boolean isFinal) |
abstract boolean |
isFinal() |
boolean |
readFrameHeader() |
protected abstract boolean |
readFrameHeaderImpl() |
void |
skipToFrameEnd() |
public void init(WebSocketContext cxt, java.io.InputStream is)
public WebSocketContext getContext()
public abstract int getOpcode()
public abstract long getLength()
public abstract boolean isFinal()
public WebSocketReader initReader(long length, boolean isFinal) throws java.io.IOException
java.io.IOException
public boolean readFrameHeader() throws java.io.IOException
java.io.IOException
protected abstract boolean readFrameHeaderImpl() throws java.io.IOException
java.io.IOException
protected boolean handleFrame() throws java.io.IOException
java.io.IOException
public void skipToFrameEnd() throws java.io.IOException
java.io.IOException
public void closeError(int i, java.lang.String msg)