aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/channels/spi
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-11-20 16:19:08 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2002-11-20 16:19:08 +0000
commit3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa (patch)
tree79f607cf0830a31df050e0c63c02b22944c84a26 /libjava/java/nio/channels/spi
parente6226a2f87a75d3daf21896affc0857a94d5d4ac (diff)
downloadgcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.zip
gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.gz
gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.bz2
2002-11-20 Michael Koch <konqueror@gmx.de>
* java/io/FileInputStream.java (getChannel): New method. * java/io/FileOutputStream.java (getChannel): New method. * java/net/ServerSocket.java (bind): Removed duplicate code and called another bind method instead. * java/nio/channels/SelectionKey.java (isValid): Removed wrong exception documentation. * java/nio/channels/ServerSocketChannel.java (accept): Added exception documentation. (open): Fixed typo, added exception documentation. * java/nio/channels/spi/AbstractSelectableChannel.java (implCloseChannel): Added exception documentation. (add): Reformated. (register): Added exception documentation. From-SVN: r59307
Diffstat (limited to 'libjava/java/nio/channels/spi')
-rw-r--r--libjava/java/nio/channels/spi/AbstractSelectableChannel.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/libjava/java/nio/channels/spi/AbstractSelectableChannel.java b/libjava/java/nio/channels/spi/AbstractSelectableChannel.java
index 433b729..da03693 100644
--- a/libjava/java/nio/channels/spi/AbstractSelectableChannel.java
+++ b/libjava/java/nio/channels/spi/AbstractSelectableChannel.java
@@ -78,8 +78,8 @@ public abstract class AbstractSelectableChannel extends SelectableChannel
{
synchronized (LOCK)
{
- blocking = true;
- implConfigureBlocking (block);
+ blocking = true;
+ implConfigureBlocking (block);
}
return this;
@@ -87,6 +87,8 @@ public abstract class AbstractSelectableChannel extends SelectableChannel
/**
* Closes this channel.
+ *
+ * @exception IOException If an error occurs
*/
protected final void implCloseChannel ()
{
@@ -168,13 +170,17 @@ public abstract class AbstractSelectableChannel extends SelectableChannel
private void add (SelectionKey key)
{
if (keys == null)
- keys = new LinkedList ();
+ {
+ keys = new LinkedList ();
+ }
keys.add (key);
}
/**
* Registers this channel with the given selector, returning a selection key.
+ *
+ * @exception ClosedChannelException If the channel is already closed.
*/
public final SelectionKey register (Selector selin, int ops, Object att)
throws ClosedChannelException
@@ -187,19 +193,19 @@ public abstract class AbstractSelectableChannel extends SelectableChannel
synchronized (LOCK)
{
- k = locate (selector);
+ k = locate (selector);
- if (k != null)
+ if (k != null)
{
k.attach (att);
}
- else
+ else
{
k = selector.register (this, ops, att);
if (k != null)
add (k);
- }
+ }
}
return k;