public abstract class AbstractInterruptibleChannel extends Object implements Channel, InterruptibleChannel
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractInterruptibleChannel()
Initializes the channel.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin()
Marks the beginning of an I/O operation that might block indefinitely.
|
void |
close()
Closes the channel.
|
protected void |
end(boolean completed)
Marks the end of an I/O operation that might block indefinitely.
|
protected abstract void |
implCloseChannel()
Closes the channel.
|
boolean |
isOpen()
Tells whether or not this channel is open.
|
protected AbstractInterruptibleChannel()
protected final void begin()
public final void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in interface InterruptibleChannelIOException - If an error occursprotected final void end(boolean completed) throws AsynchronousCloseException
completed - true if the task completed successfully,
false otherwiseAsynchronousCloseException - If the channel was asynchronously
closed.ClosedByInterruptException - If the thread blocked in the
I/O operation was interrupted.protected abstract void implCloseChannel() throws IOException
IOException - If an error occurs