public class AbstractWrappedByteChannel extends Object implements WrappedByteChannel
Constructor and Description |
---|
AbstractWrappedByteChannel(ByteChannel towrap) |
AbstractWrappedByteChannel(WrappedByteChannel towrap) |
Modifier and Type | Method and Description |
---|---|
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(ByteBuffer dst) |
int |
readMore(ByteBuffer dst)
This function does not read data from the underlying channel at all.
|
int |
write(ByteBuffer src) |
void |
writeMore()
Gets called when
WrappedByteChannel.isNeedWrite() ()} requires a additional rite |
public AbstractWrappedByteChannel(ByteChannel towrap)
public AbstractWrappedByteChannel(WrappedByteChannel towrap)
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
public int write(ByteBuffer src) throws IOException
write
in interface WritableByteChannel
IOException
public boolean isNeedWrite()
WrappedByteChannel
isNeedWrite
in interface WrappedByteChannel
public void writeMore() throws IOException
WrappedByteChannel
WrappedByteChannel.isNeedWrite()
()} requires a additional ritewriteMore
in interface WrappedByteChannel
IOException
- may be thrown due to an error while writingpublic boolean isNeedRead()
WrappedByteChannel
isNeedRead
in interface WrappedByteChannel
ReadableByteChannel.read(ByteBuffer)
,
WrappedByteChannel.readMore(ByteBuffer)
public int readMore(ByteBuffer dst) throws IOException
WrappedByteChannel
ReadableByteChannel.read(ByteBuffer)
.readMore
in interface WrappedByteChannel
dst
- the destiny of the readIOException
- when a error occurred during unwrappingpublic boolean isBlocking()
WrappedByteChannel
isBlocking
in interface WrappedByteChannel
Copyright © 2018. All rights reserved.