org.java_websocket
Class AbstractWrappedByteChannel
java.lang.Object
org.java_websocket.AbstractWrappedByteChannel
- All Implemented Interfaces:
- Closeable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel, WrappedByteChannel
- Direct Known Subclasses:
- AbstractClientProxyChannel
public class AbstractWrappedByteChannel
- extends Object
- implements WrappedByteChannel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractWrappedByteChannel
public AbstractWrappedByteChannel(ByteChannel towrap)
AbstractWrappedByteChannel
public AbstractWrappedByteChannel(WrappedByteChannel towrap)
read
public int read(ByteBuffer dst)
throws IOException
- Specified by:
read
in interface ReadableByteChannel
- Throws:
IOException
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface Channel
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface Channel
- Throws:
IOException
write
public int write(ByteBuffer src)
throws IOException
- Specified by:
write
in interface WritableByteChannel
- Throws:
IOException
isNeedWrite
public boolean isNeedWrite()
- Specified by:
isNeedWrite
in interface WrappedByteChannel
writeMore
public void writeMore()
throws IOException
- Specified by:
writeMore
in interface WrappedByteChannel
- Throws:
IOException
isNeedRead
public boolean isNeedRead()
- Description copied from interface:
WrappedByteChannel
- returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
- Specified by:
isNeedRead
in interface WrappedByteChannel
- See Also:
ReadableByteChannel.read(ByteBuffer)
,
WrappedByteChannel.readMore(ByteBuffer)
readMore
public int readMore(ByteBuffer dst)
throws SSLException
- Description copied from interface:
WrappedByteChannel
- 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)
.
- Specified by:
readMore
in interface WrappedByteChannel
- Throws:
SSLException
isBlocking
public boolean isBlocking()
- Specified by:
isBlocking
in interface WrappedByteChannel
Copyright © 2013 Pusher. All Rights Reserved.