public static void writeVLong ( OutputStream out , long value ) throws IOException { if ( value < 0 ) out . write ( ( byte ) 0x81 ) ; if ( value > 0xFFFFFFFFFFFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 56 ) & 0x7F L ) ) ) ; if ( value > 0x1FFFFFFFFFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 49 ) & 0x7F L ) ) ) ; if ( value > 0x3FFFFFFFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 42 ) & 0x7F L ) ) ) ; if ( value > 0x7FFFFFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 35 ) & 0x7F L ) ) ) ; if ( value > 0xFFFFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 28 ) & 0x7F L ) ) ) ; if ( value > 0x1FFFFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 21 ) & 0x7F L ) ) ) ; if ( value > 0x3FFF L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 14 ) & 0x7F L ) ) ) ; if ( value > 0x7F L || value < 0 ) out . write ( ( byte ) ( 0x80 | ( ( value >>> 7 ) & 0x7F L ) ) ) ; out . write ( ( byte ) ( value & 0x7F L ) ) ; }
Encode the specified long as a variable length integer into the supplied OuputStream