public static void writeUnsignedLong ( ObjectOutput out , long i ) throws IOException { while ( ( i & ~ 0x7F ) != 0 ) { out . writeByte ( ( byte ) ( ( i & 0x7f ) | 0x80 ) ) ; i >>>= 7 ; } out . writeByte ( ( byte ) i ) ; }
Writes a long in a variable - length format . Writes between one and nine bytes . Smaller values take fewer bytes . Negative numbers are not supported .