public void write(final char chars[],final int start,final int length) throws java.io.IOException {
  if (m_writer != null)   m_writer.write(chars,start,length);
  int lengthx3=(length << 1) + length;
  if (lengthx3 >= buf_length) {
    flushBuffer();
    setBufferSize(2 * lengthx3);
  }
  if (lengthx3 > buf_length - count) {
    flushBuffer();
  }
  final int n=length + start;
  for (int i=start; i < n; i++) {
    final char c=chars[i];
    if (c < 0x80)     buf[count++]=(byte)(c);
 else     if (c < 0x800) {
      buf[count++]=(byte)(0xc0 + (c >> 6));
      buf[count++]=(byte)(0x80 + (c & 0x3f));
    }
 else {
      buf[count++]=(byte)(0xe0 + (c >> 12));
      buf[count++]=(byte)(0x80 + ((c >> 6) & 0x3f));
      buf[count++]=(byte)(0x80 + (c & 0x3f));
    }
  }
}

public void write ( final char chars [ ] , final int start , final int length ) throws java . io . IOException { if ( m_writer != null ) m_writer . write ( chars , start , length ) ; int lengthx3 = ( length << 1 ) + length ; if ( lengthx3 >= buf_length ) { flushBuffer ( ) ; setBufferSize ( 2 * lengthx3 ) ; } if ( lengthx3 > buf_length - count ) { flushBuffer ( ) ; } final int n = length + start ; for ( int i = start ; i < n ; i ++ ) { final char c = chars [ i ] ; if ( c < 0x80 ) buf [ count ++ ] = ( byte ) ( c ) ; else if ( c < 0x800 ) { buf [ count ++ ] = ( byte ) ( 0xc0 + ( c > > 6 ) ) ; buf [ count ++ ] = ( byte ) ( 0x80 + ( c & 0x3f ) ) ; } else { buf [ count ++ ] = ( byte ) ( 0xe0 + ( c > > 12 ) ) ; buf [ count ++ ] = ( byte ) ( 0x80 + ( ( c > > 6 ) & 0x3f ) ) ; buf [ count ++ ] = ( byte ) ( 0x80 + ( c & 0x3f ) ) ; } } }
write a portion of an array of characters .
