com.caucho.remote.websocket
Class WebSocketMaskedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.caucho.remote.websocket.WebSocketInputStream
          extended by com.caucho.remote.websocket.WebSocketMaskedInputStream
All Implemented Interfaces:
WebSocketConstants, java.io.Closeable

public class WebSocketMaskedInputStream
extends WebSocketInputStream

WebSocketInputStream reads a single WebSocket packet.

 +-+------+---------+-+---------+
 |F|xxx(3)|opcode(4)|M|len(7)   |
 +-+------+---------+-+---------+
 
 OPCODES
   0 - cont
   1 - text
   2 - binary
 


Field Summary
 
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
 
Constructor Summary
WebSocketMaskedInputStream(FrameInputStream is)
           
 
Method Summary
 boolean readFrameHeader()
           
 boolean startBinaryMessage()
           
 
Methods inherited from class com.caucho.remote.websocket.WebSocketInputStream
getLength, init, read, read
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketMaskedInputStream

public WebSocketMaskedInputStream(FrameInputStream is)
                           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

startBinaryMessage

public boolean startBinaryMessage()
                           throws java.io.IOException
Overrides:
startBinaryMessage in class WebSocketInputStream
Throws:
java.io.IOException

readFrameHeader

public boolean readFrameHeader()
                        throws java.io.IOException
Throws:
java.io.IOException