code: public static Reader newReader(ReadableByteChannel ch,
                                     CharsetDecoder dec,
                                     int minBufferCap)
      {
          checkNotNull(ch, "ch");
          return StreamDecoder.forDecoder(ch, dec.reset(), minBufferCap);
      }
docs: Constructs a reader that decodes bytes from the given channel using the
  given decoder.
  
  <p> The resulting stream will contain an internal input buffer of at
  least <tt>minBufferCap</tt> bytes.  The stream's <tt>read</tt> methods
  will, as needed, fill the buffer by reading bytes from the underlying
  channel; if the channel is in non-blocking mode when bytes are to be
  read then an {@link IllegalBlockingModeException} will be thrown.  The
  resulting stream will not otherwise be buffered, and it will not support
  the {@link Reader#mark mark} or {@link Reader#reset reset} methods.
  Closing the stream will in turn cause the channel to be closed.  </p>
  
  @param  ch
  The channel from which bytes will be read
  
  @param  dec
  The charset decoder to be used
  
  @param  minBufferCap
  The minimum capacity of the internal byte buffer,
  or <tt>-1</tt> if an implementation-dependent
  default capacity is to be used
  
  @return  A new reader