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.ByteChannelchannelDeprecated.
-
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 voidclose()Deprecated.booleanisBlocking()Deprecated.This function returns the blocking state of the channelbooleanisNeedRead()Deprecated.returns whether readMore should be called to fetch data which has been decoded but not yet been returned.booleanisNeedWrite()Deprecated.returns whether writeMore should be called write additional data.booleanisOpen()Deprecated.intread(java.nio.ByteBuffer dst)Deprecated.intreadMore(java.nio.ByteBuffer dst)Deprecated.This function does not read data from the underlying channel at all.intwrite(java.nio.ByteBuffer src)Deprecated.voidwriteMore()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.IOExceptionDeprecated.- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
Deprecated.- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOExceptionDeprecated.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOExceptionDeprecated.- Specified by:
writein interfacejava.nio.channels.WritableByteChannel- Throws:
java.io.IOException
-
isNeedWrite
public boolean isNeedWrite()
Deprecated.Description copied from interface:WrappedByteChannelreturns whether writeMore should be called write additional data.- Specified by:
isNeedWritein interfaceWrappedByteChannel- Returns:
- is a additional write needed
-
writeMore
public void writeMore() throws java.io.IOExceptionDeprecated.Description copied from interface:WrappedByteChannelGets called whenWrappedByteChannel.isNeedWrite()()} requires a additional rite- Specified by:
writeMorein interfaceWrappedByteChannel- Throws:
java.io.IOException- may be thrown due to an error while writing
-
isNeedRead
public boolean isNeedRead()
Deprecated.Description copied from interface:WrappedByteChannelreturns whether readMore should be called to fetch data which has been decoded but not yet been returned.- Specified by:
isNeedReadin 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.IOExceptionDeprecated.Description copied from interface:WrappedByteChannelThis 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:
readMorein 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:WrappedByteChannelThis function returns the blocking state of the channel- Specified by:
isBlockingin interfaceWrappedByteChannel- Returns:
- is the channel blocking
-
-