public abstract class AbstractInterruptibleChannel extends java.lang.Object implements java.nio.channels.Channel, java.nio.channels.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 java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in interface java.nio.channels.InterruptibleChanneljava.io.IOException - If an error occursprotected final void end(boolean completed) throws java.nio.channels.AsynchronousCloseException
completed - true if the task completed successfully,
false otherwisejava.nio.channels.AsynchronousCloseException - If the channel was asynchronously
closed.java.nio.channels.ClosedByInterruptException - If the thread blocked in the
I/O operation was interrupted.protected abstract void implCloseChannel() throws java.io.IOException
java.io.IOException - If an error occurspublic final boolean isOpen()
isOpen in interface java.nio.channels.Channel