public class AbstractWrappedByteChannel extends java.lang.Object implements WrappedByteChannel
构造器和说明 |
---|
AbstractWrappedByteChannel(java.nio.channels.ByteChannel towrap) |
AbstractWrappedByteChannel(WrappedByteChannel towrap) |
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
boolean |
isBlocking()
This function returns the blocking state of the channel
|
boolean |
isNeedRead()
returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
|
boolean |
isNeedWrite()
returns whether writeMore should be called write additional data.
|
boolean |
isOpen() |
int |
read(java.nio.ByteBuffer dst) |
int |
readMore(java.nio.ByteBuffer dst)
This function does not read data from the underlying channel at all.
|
int |
write(java.nio.ByteBuffer src) |
void |
writeMore()
Gets called when
WrappedByteChannel.isNeedWrite() ()} requires a additional rite |
public AbstractWrappedByteChannel(java.nio.channels.ByteChannel towrap)
public AbstractWrappedByteChannel(WrappedByteChannel towrap)
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
在接口中 java.nio.channels.ReadableByteChannel
java.io.IOException
public boolean isOpen()
isOpen
在接口中 java.nio.channels.Channel
public void close() throws java.io.IOException
close
在接口中 java.io.Closeable
close
在接口中 java.lang.AutoCloseable
close
在接口中 java.nio.channels.Channel
java.io.IOException
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
在接口中 java.nio.channels.WritableByteChannel
java.io.IOException
public boolean isNeedWrite()
WrappedByteChannel
isNeedWrite
在接口中 WrappedByteChannel
public void writeMore() throws java.io.IOException
WrappedByteChannel
WrappedByteChannel.isNeedWrite()
()} requires a additional ritewriteMore
在接口中 WrappedByteChannel
java.io.IOException
- may be thrown due to an error while writingpublic boolean isNeedRead()
WrappedByteChannel
isNeedRead
在接口中 WrappedByteChannel
ReadableByteChannel.read(ByteBuffer)
,
WrappedByteChannel.readMore(ByteBuffer)
public int readMore(java.nio.ByteBuffer dst) throws java.io.IOException
WrappedByteChannel
ReadableByteChannel.read(ByteBuffer)
.readMore
在接口中 WrappedByteChannel
dst
- the destiny of the readjava.io.IOException
- when a error occurred during unwrappingpublic boolean isBlocking()
WrappedByteChannel
isBlocking
在接口中 WrappedByteChannel