public static void writeVInt(ByteDataBuffer buf, int value) {
    """
	Encode the specified int as a variable length integer into the supplied {@link ByteDataBuffer}
	
	@param buf the buffer to write to
	@param value the int value
    """
        if(value > 0x0FFFFFFF || value < 0) buf.write((byte)(0x80 | ((value >>> 28))));
        if(value > 0x1FFFFF || value < 0)   buf.write((byte)(0x80 | ((value >>> 21) & 0x7F)));
        if(value > 0x3FFF || value < 0)     buf.write((byte)(0x80 | ((value >>> 14) & 0x7F)));
        if(value > 0x7F || value < 0)       buf.write((byte)(0x80 | ((value >>>  7) & 0x7F)));

        buf.write((byte)(value & 0x7F));
    }
public static void writeVInt(ByteDataBuffer buf, int value) {
        if(value > 0x0FFFFFFF || value < 0) buf.write((byte)(0x80 | ((value >>> 28))));
        if(value > 0x1FFFFF || value < 0)   buf.write((byte)(0x80 | ((value >>> 21) & 0x7F)));
        if(value > 0x3FFF || value < 0)     buf.write((byte)(0x80 | ((value >>> 14) & 0x7F)));
        if(value > 0x7F || value < 0)       buf.write((byte)(0x80 | ((value >>>  7) & 0x7F)));

        buf.write((byte)(value & 0x7F));
    }
public static void writeVInt ( ByteDataBuffer buf , int value ) { if ( value > 0x0FFFFFFF || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 28 ) ) ) ) ; if ( value > 0x1FFFFF || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 21 ) & 0x7F ) ) ) ; if ( value > 0x3FFF || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 14 ) & 0x7F ) ) ) ; if ( value > 0x7F || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 7 ) & 0x7F ) ) ) ; buf . write ( ( byte ) ( value & 0x7F ) ) ; }
Encode the specified int as a variable length integer into the supplied {@link ByteDataBuffer}

@param buf the buffer to write to
@param value the int value
Encode the specified int as a variable length integer into the supplied { @link ByteDataBuffer }