Code example for ReadableByteChannel

Methods: read

0
      super((SelectableChannel)channel, timeout);
      this.channel = channel;
    } 
     
    int performIO(ByteBuffer buf) throws IOException {
      return channel.read(buf);
    } 
  } 
   
  /** 
   * Create a new input 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 reading, 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 
   */ 
Stop searching for code, let great code find you!  Add Codota to your java IDE