Code example for SocketChannel

Methods: close

0
        return (socketChannel!=null?socketChannel.isOpen():false);
    } 
     
    public void close() throws IOException 
    { 
        socketChannel.close();
    } 
     
    public int write(ByteBuffer src) throws IOException
    { 
        return (int)OutputWriter.flushChannel(socketChannel,src, writeTimeout);
    } 
     
    public int write(ByteBuffer[] src) throws IOException
    { 
        return (int)OutputWriter.flushChannel(socketChannel,src, writeTimeout);
    } 
     
    public SocketChannel getSocketChannel()
    { 
        return socketChannel;