Generated by
JDiff

java.nio.channels.spi Documentation Differences

This file contains all the changes in documentation in the package java.nio.channels.spi as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AbstractInterruptibleChannel

Base implementation class for interruptible channels.

This class encapsulates the low-level machinery required to implement the asynchronous closing and interruption of channels. A concrete channel class must invoke the begin and end methods before and after respectively invoking an I/O operation that might block indefinitely. In order to ensure that the end method is always invoked these methods should be used within a try ... finally block:

 boolean completed = false; try { begin(); completed = ...; // Perform blocking I/O operation return ...; // Return result } finally { end(completed); }

The completed argument to the end method tells whether or not the I/O operation actually completed that is whether it had any effect that would be visible to the invoker. In the case of an operation that reads bytes for example this argument should be true if and only if some bytes were actually transferred into the invoker's target buffer.

A concrete channel class must also implement the implCloseChannel method in such a way that if it is invoked while another thread is blocked in a native I/O operation upon the channel then that operation will immediately return either by throwing an exception or by returning normally. If a thread is interrupted or the channel upon which it is blocked is asynchronously closed then the channel's end method will throw the appropriate exception.

This class performs the synchronization required to implement the java.nio.channels.Channel specification. Implementations of the implCloseChannel method need not synchronize against other threads that might be attempting to close the channel.

@author Mark Reinhold @author JSR-51 Expert Group @version 1.12 0113 02/1106/2811 @since 1.4

Class AbstractSelectableChannel

Base implementation class for selectable channels.

This class defines methods that handle the mechanics of channel registration deregistration and closing. It maintains the current blocking mode of this channel as well as its current set of selection keys. It performs all of the synchronization required to implement the java.nio.channels.SelectableChannel specification. Implementations of the abstract protected methods defined in this class need not synchronize against other threads that might be engaged in the same operations.

@author Mark Reinhold @author Mike McCloskey @author JSR-51 Expert Group @version 1.18 0119 02/1202/0325 @since 1.4