question: private static final void appendEncodedByte ( StringBuffer buffer , byte value , byte [ ] state ) { if ( state [ 0 ] != 0 ) { char c = ( char ) ( ( state [ 1 ] << 8 ) | ( ( ( int ) value ) & 0xFF ) ) ; buffer . append ( c ) ; state [ 0 ] = 0 ; } else { state [ 0 ] = 1 ; state [ 1 ] = value ; } }
target:  Append a byte to the given StringBuffer, packing two bytes into each character.  The state parameter maintains intermediary data between calls.