diff options
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(); + } } |