org.java_websocket
Interface WrappedByteChannel

All Superinterfaces:
ByteChannel, Channel, Closeable, ReadableByteChannel, WritableByteChannel
All Known Implementing Classes:
AbstractClientProxyChannel, AbstractWrappedByteChannel, SSLSocketChannel2, WebSocketClient.DefaultClientProxyChannel

public interface WrappedByteChannel
extends ByteChannel


Method Summary
 boolean isBlocking()
           
 boolean isNeedRead()
          returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
 boolean isNeedWrite()
           
 int readMore(ByteBuffer dst)
          This function does not read data from the underlying channel at all.
 void writeMore()
           
 
Methods inherited from interface java.nio.channels.ReadableByteChannel
read
 
Methods inherited from interface java.nio.channels.WritableByteChannel
write
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Method Detail

isNeedWrite

boolean isNeedWrite()

writeMore

void writeMore()
               throws IOException
Throws:
IOException

isNeedRead

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

See Also:
ReadableByteChannel.read(ByteBuffer), readMore(ByteBuffer)

readMore

int readMore(ByteBuffer dst)
             throws SSLException
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 ReadableByteChannel.read(ByteBuffer).

Throws:
SSLException

isBlocking

boolean isBlocking()


Copyright © 2013 Pusher. All Rights Reserved.