Top Methods
org.java_websocket

public Interface WrappedByteChannel

extends ByteChannel
Known Direct Implementers
org.java_websocket.AbstractWrappedByteChannel, org.java_websocket.SSLSocketChannel, org.java_websocket.SSLSocketChannel2
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.channels.ByteChannel

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

is the channel blocking
isBlocking
()

This function returns the blocking state of the channel

public boolean

Returns:

is a additional read needed
isNeedRead
()

returns whether readMore should be called to fetch data which has been decoded but not yet been returned.

public boolean

Returns:

is a additional write needed
isNeedWrite
()

returns whether writeMore should be called write additional data.

public int

Returns:

the amount of remaining data
readMore
(ByteBuffer
the destiny of the read
dst
)

This function does not read data from the underlying channel at all.

public void
writeMore()

Gets called when isNeedWrite() ()} requires a additional rite

Method Detail

isBlockingback to summary
public boolean isBlocking()

This function returns the blocking state of the channel

Returns:boolean

is the channel blocking

isNeedReadback to summary
public boolean isNeedRead()

returns whether readMore should be called to fetch data which has been decoded but not yet been returned.

Returns:boolean

is a additional read needed

See Also
read(ByteBuffer), readMore(ByteBuffer)
isNeedWriteback to summary
public boolean isNeedWrite()

returns whether writeMore should be called write additional data.

Returns:boolean

is a additional write needed

readMoreback to summary
public int readMore(ByteBuffer dst) throws IOException

This function does not read data from the underlying channel at all. It is just a way to fetch data which has already be received or decoded but was but was not yet returned to the user. This could be the case when the decoded data did not fit into the buffer the user passed to read(ByteBuffer).

Parameters
dst:ByteBuffer

the destiny of the read

Returns:int

the amount of remaining data

Exceptions
IOException:
when a error occurred during unwrapping
writeMoreback to summary
public void writeMore() throws IOException

Gets called when isNeedWrite() ()} requires a additional rite

Exceptions
IOException:
may be thrown due to an error while writing