Package org.java_websocket
Class AbstractWrappedByteChannel
- java.lang.Object
-
- org.java_websocket.AbstractWrappedByteChannel
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.ByteChannel
,java.nio.channels.Channel
,java.nio.channels.ReadableByteChannel
,java.nio.channels.WritableByteChannel
,WrappedByteChannel
@Deprecated public class AbstractWrappedByteChannel extends java.lang.Object implements WrappedByteChannel
Deprecated.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.ByteChannel
channel
Deprecated.
-
Constructor Summary
Constructors Constructor Description AbstractWrappedByteChannel(java.nio.channels.ByteChannel towrap)
Deprecated.AbstractWrappedByteChannel(WrappedByteChannel towrap)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.boolean
isBlocking()
Deprecated.This function returns the blocking state of the channelboolean
isNeedRead()
Deprecated.returns whether readMore should be called to fetch data which has been decoded but not yet been returned.boolean
isNeedWrite()
Deprecated.returns whether writeMore should be called write additional data.boolean
isOpen()
Deprecated.int
read(java.nio.ByteBuffer dst)
Deprecated.int
readMore(java.nio.ByteBuffer dst)
Deprecated.This function does not read data from the underlying channel at all.int
write(java.nio.ByteBuffer src)
Deprecated.void
writeMore()
Deprecated.Gets called whenWrappedByteChannel.isNeedWrite()
()} requires a additional rite
-
-
-
Constructor Detail
-
AbstractWrappedByteChannel
@Deprecated public AbstractWrappedByteChannel(java.nio.channels.ByteChannel towrap)
Deprecated.
-
AbstractWrappedByteChannel
@Deprecated public AbstractWrappedByteChannel(WrappedByteChannel towrap)
Deprecated.
-
-
Method Detail
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
Deprecated.- Specified by:
read
in interfacejava.nio.channels.ReadableByteChannel
- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
Deprecated.- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOException
Deprecated.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException
Deprecated.- Specified by:
write
in interfacejava.nio.channels.WritableByteChannel
- Throws:
java.io.IOException
-
isNeedWrite
public boolean isNeedWrite()
Deprecated.Description copied from interface:WrappedByteChannel
returns whether writeMore should be called write additional data.- Specified by:
isNeedWrite
in interfaceWrappedByteChannel
- Returns:
- is a additional write needed
-
writeMore
public void writeMore() throws java.io.IOException
Deprecated.Description copied from interface:WrappedByteChannel
Gets called whenWrappedByteChannel.isNeedWrite()
()} requires a additional rite- Specified by:
writeMore
in interfaceWrappedByteChannel
- Throws:
java.io.IOException
- may be thrown due to an error while writing
-
isNeedRead
public boolean isNeedRead()
Deprecated.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 interfaceWrappedByteChannel
- Returns:
- is a additional read needed
- See Also:
ReadableByteChannel.read(ByteBuffer)
,WrappedByteChannel.readMore(ByteBuffer)
-
readMore
public int readMore(java.nio.ByteBuffer dst) throws java.io.IOException
Deprecated.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 toReadableByteChannel.read(ByteBuffer)
.- Specified by:
readMore
in interfaceWrappedByteChannel
- Parameters:
dst
- the destiny of the read- Returns:
- the amount of remaining data
- Throws:
java.io.IOException
- when a error occurred during unwrapping
-
isBlocking
public boolean isBlocking()
Deprecated.Description copied from interface:WrappedByteChannel
This function returns the blocking state of the channel- Specified by:
isBlocking
in interfaceWrappedByteChannel
- Returns:
- is the channel blocking
-
-