diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
| commit | 65bf3316cf384588453604be6b4f0ed3751a8b0f (patch) | |
| tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/gnu/java/nio/NIOSocket.java | |
| parent | 8fc56618a84446beccd45b80381cdfe0e94050df (diff) | |
| download | gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz | |
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/java/nio/NIOSocket.java')
| -rw-r--r-- | libjava/classpath/gnu/java/nio/NIOSocket.java | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/libjava/classpath/gnu/java/nio/NIOSocket.java b/libjava/classpath/gnu/java/nio/NIOSocket.java index 4d812bf44ba..060a3a89c1c 100644 --- a/libjava/classpath/gnu/java/nio/NIOSocket.java +++ b/libjava/classpath/gnu/java/nio/NIOSocket.java @@ -48,30 +48,33 @@ import java.nio.channels.SocketChannel; */ public final class NIOSocket extends Socket { - private PlainSocketImpl impl; private SocketChannelImpl channel; - protected NIOSocket (PlainSocketImpl impl, SocketChannelImpl channel) + protected NIOSocket (SocketChannelImpl channel) throws IOException { - super (impl); - this.impl = impl; + super (new NIOSocketImpl(channel)); this.channel = channel; } - public final PlainSocketImpl getPlainSocketImpl() - { - return impl; - } + //public final PlainSocketImpl getPlainSocketImpl() + //{ + // return impl; + //} - final void setChannel (SocketChannelImpl channel) - { - this.impl = channel.getPlainSocketImpl(); - this.channel = channel; - } + //final void setChannel (SocketChannelImpl channel) + //{ + // this.impl = channel.getPlainSocketImpl(); + // this.channel = channel; + //} public final SocketChannel getChannel() { return channel; } + + public boolean isConnected() + { + return channel.isConnected(); + } } |
