public class FrameScanner extends Object
InputStream
(which is supposed to be the input stream of a WebSocket
. Each time the
getFrame()
method is called, it tries to create a RawFrame
from bytes that arrived on the input stream.Constructor and Description |
---|
FrameScanner(InputStream is)
Create a new FrameScanner for the given
InputStream . |
public FrameScanner(InputStream is)
InputStream
.is
- the input stream to read from. It is supposed to be the stream of a WebSocket
public RawFrame getFrame() throws IOException, WebSocketException
IOException
occurs.IOException
- if an IOException
is encountered by the input streamWebSocketException
- if the frame is invalid.