@Override public int read(char ch[],int offset,int length) throws IOException {
  int byteLength=length << 1;
  if (byteLength > fBuffer.length) {
    byteLength=fBuffer.length;
  }
  int byteCount=fInputStream.read(fBuffer,0,byteLength);
  if (byteCount == -1) {
    return -1;
  }
  if ((byteCount & 1) != 0) {
    int b=fInputStream.read();
    if (b == -1) {
      expectedTwoBytes();
    }
    fBuffer[byteCount++]=(byte)b;
  }
  final int charCount=byteCount >> 1;
  if (fIsBigEndian) {
    processBE(ch,offset,charCount);
  }
 else {
    processLE(ch,offset,charCount);
  }
  return charCount;
}

@ Override public int read ( char ch [ ] , int offset , int length ) throws IOException { int byteLength = length << 1 ; if ( byteLength > fBuffer . length ) { byteLength = fBuffer . length ; } int byteCount = fInputStream . read ( fBuffer , 0 , byteLength ) ; if ( byteCount == - 1 ) { return - 1 ; } if ( ( byteCount & 1 ) != 0 ) { int b = fInputStream . read ( ) ; if ( b == - 1 ) { expectedTwoBytes ( ) ; } fBuffer [ byteCount ++ ] = ( byte ) b ; } final int charCount = byteCount > > 1 ; if ( fIsBigEndian ) { processBE ( ch , offset , charCount ) ; } else { processLE ( ch , offset , charCount ) ; } return charCount ; }
read characters into a portion of an array . this method will block until some input is available , an i / o error occurs , or the end of the stream is reached .
