public void write(final int c) throws IOException {
  if (m_writer != null)   m_writer.write(c);
  if (count >= buf_length)   flushBuffer();
  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 int c ) throws IOException { if ( m_writer != null ) m_writer . write ( c ) ; if ( count >= buf_length ) flushBuffer ( ) ; 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 single character . the character to be written is contained in the 16 low - order bits of the given integer value ; the 16 high - order bits are ignored . < p > subclasses that intend to support efficient single - character output should override this method .
