Code example for WritableByteChannel

Methods: write

0
      super((SelectableChannel)channel, timeout);
      this.channel = channel;
    } 
     
    int performIO(ByteBuffer buf) throws IOException {
      return channel.write(buf);
    } 
  } 
   
  /** 
   * Create a new ouput stream with the given timeout. If the timeout 
   * is zero, it will be treated as infinite timeout. The socket's 
   * channel will be configured to be non-blocking. 
   *  
   * @param channel  
   *        Channel for writing, should also be a {@link SelectableChannel}.   
   *        The channel will be configured to be non-blocking. 
   * @param timeout timeout in milliseconds. must not be negative. 
   * @throws IOException 
   */ 
Contextual code suggestions in your IDE  Get Codota for Java