-
- All Implemented Interfaces:
-
com.tds.common.websocket.conn.WrappedByteChannel
,java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.ByteChannel
,java.nio.channels.Channel
,java.nio.channels.ReadableByteChannel
,java.nio.channels.WritableByteChannel
@Deprecated() public class AbstractWrappedByteChannel implements WrappedByteChannel
-
-
Constructor Summary
Constructors Constructor Description AbstractWrappedByteChannel(ByteChannel towrap)
AbstractWrappedByteChannel(WrappedByteChannel towrap)
-
Method Summary
Modifier and Type Method Description int
read(ByteBuffer dst)
boolean
isOpen()
void
close()
int
write(ByteBuffer src)
boolean
isNeedWrite()
returns whether writeMore should be called write additional data. void
writeMore()
Gets called when isNeedWrite ()} requires a additional rite boolean
isNeedRead()
returns whether readMore should be called to fetch data which has been decoded but not yet beenreturned. int
readMore(ByteBuffer dst)
This function does not read data from the underlying channel at all. boolean
isBlocking()
This function returns the blocking state of the channel -
Methods inherited from class java.nio.channels.ReadableByteChannel
read
-
Methods inherited from class java.nio.channels.Channel
close, isOpen
-
Methods inherited from class java.nio.channels.WritableByteChannel
write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AbstractWrappedByteChannel
AbstractWrappedByteChannel(ByteChannel towrap)
-
AbstractWrappedByteChannel
AbstractWrappedByteChannel(WrappedByteChannel towrap)
-
-
Method Detail
-
read
int read(ByteBuffer dst)
-
isOpen
boolean isOpen()
-
close
void close()
-
write
int write(ByteBuffer src)
-
isNeedWrite
boolean isNeedWrite()
returns whether writeMore should be called write additional data.
-
writeMore
void writeMore()
Gets called when isNeedWrite ()} requires a additional rite
-
isNeedRead
boolean isNeedRead()
returns whether readMore should be called to fetch data which has been decoded but not yet beenreturned.
-
readMore
int readMore(ByteBuffer dst)
This function does not read data from the underlying channel at all. It is just a way to fetchdata 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.
- Parameters:
dst
- the destiny of the read
-
isBlocking
boolean isBlocking()
This function returns the blocking state of the channel
-
-
-
-