public int read(char[] cbuf,int off,int len) throws java.io.IOException {
  if (cbuffer == null) {
    complete();
    cbufferOff=0;
  }
  if (cbufferOff == cbuffer.length) {
    return -1;
  }
  int count=0;
  while (cbufferOff < cbuffer.length && len > count) {
    cbuf[off]=cbuffer[cbufferOff];
    count++;
    off++;
    cbufferOff++;
  }
  if (count == len) {
    return count;
  }
  return count;
}

public int read ( char [ ] cbuf , int off , int len ) throws java . io . IOException { if ( cbuffer == null ) { complete ( ) ; cbufferOff = 0 ; } if ( cbufferOff == cbuffer . length ) { return - 1 ; } int count = 0 ; while ( cbufferOff < cbuffer . length && len > count ) { cbuf [ off ] = cbuffer [ cbufferOff ] ; count ++ ; off ++ ; cbufferOff ++ ; } if ( count == len ) { return count ; } return count ; }
read characters into a portion of an array .
