com.caucho.remote.websocket
Class WebSocketReader
java.lang.Object
java.io.Reader
com.caucho.remote.websocket.WebSocketReader
- All Implemented Interfaces:
- WebSocketConstants, java.io.Closeable, java.lang.Readable
public class WebSocketReader
- extends java.io.Reader
- implements WebSocketConstants
WebSocketReader reads a single WebSocket packet.
0x00 utf-8 data 0xff
Fields inherited from class java.io.Reader |
lock |
Fields inherited from interface com.caucho.remote.websocket.WebSocketConstants |
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 |
Method Summary |
void |
close()
|
long |
getLength()
|
void |
init()
|
void |
init(long length,
boolean isFinal)
|
int |
read()
|
int |
read(char[] buffer,
int offset,
int length)
|
Methods inherited from class java.io.Reader |
mark, markSupported, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebSocketReader
public WebSocketReader(FrameInputStream is)
throws java.io.IOException
- Throws:
java.io.IOException
init
public void init()
throws java.io.IOException
- Throws:
java.io.IOException
init
public void init(long length,
boolean isFinal)
getLength
public long getLength()
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.Reader
- Throws:
java.io.IOException
read
public int read(char[] buffer,
int offset,
int length)
throws java.io.IOException
- Specified by:
read
in class java.io.Reader
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Reader
- Throws:
java.io.IOException