public void writeValue ( final int length , final int value ) throws EncodingException { if ( length > 31 ) { throw ErrorFactory . createEncodingException ( ErrorKeys . DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE , "more than maximum length: " + value ) ; } for ( int i = length - 1 ; i >= 0 ; i -- ) { writeBit ( ( value >> i ) & 1 ) ; } }
Writes a positive integer to the buffer .