Top Constructors Methods
org.java_websocket

public Class SocketChannelIOHelper

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.channels.ByteChannel, org.java_websocket.enums.Role

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

returns Whether there is more data to write
batch
(WebSocketImpl
The WebSocketImpl associated with the channels
ws
,
ByteChannel
The channel to write to
sockchannel
)

Returns whether the whole outQueue has been flushed

public static boolean
read(final ByteBuffer buf, WebSocketImpl ws, ByteChannel channel)

public static boolean

Returns:

returns Whether there is more data left which can be obtained via WrappedByteChannel#readMore(ByteBuffer)
readMore
(final ByteBuffer
The ByteBuffer to read from
buf
,
WebSocketImpl
The WebSocketImpl associated with the channels
ws
,
WrappedByteChannel
The channel to read from
channel
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SocketChannelIOHelperback to summary
private SocketChannelIOHelper()

Method Detail

batchback to summary
public static boolean batch(WebSocketImpl ws, ByteChannel sockchannel) throws IOException

Returns whether the whole outQueue has been flushed

Parameters
ws:WebSocketImpl

The WebSocketImpl associated with the channels

sockchannel:ByteChannel

The channel to write to

Returns:boolean

returns Whether there is more data to write

Exceptions
IOException:
May be thrown by WrappedByteChannel#writeMore()
readback to summary
public static boolean read(final ByteBuffer buf, WebSocketImpl ws, ByteChannel channel) throws IOException
readMoreback to summary
public static boolean readMore(final ByteBuffer buf, WebSocketImpl ws, WrappedByteChannel channel) throws IOException
Parameters
buf:ByteBuffer

The ByteBuffer to read from

ws:WebSocketImpl

The WebSocketImpl associated with the channels

channel:WrappedByteChannel

The channel to read from

Returns:boolean

returns Whether there is more data left which can be obtained via WrappedByteChannel#readMore(ByteBuffer)

Exceptions
IOException:
May be thrown by WrappedByteChannel#readMore(ByteBuffer)#
See Also
WrappedByteChannel#readMore(ByteBuffer)