public void write ( int c ) throws IOException { synchronized ( lock ) { if ( writeBuffer == null ) { writeBuffer = new char [ WRITE_BUFFER_SIZE ] ; } writeBuffer [ 0 ] = ( char ) c ; write ( writeBuffer , 0 , 1 ) ; } }
Writes 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 .