public static void writeUintvar(OutputStream theOs,long theValue) throws IOException {
  int nOctets=1;
  while ((theValue >> (7 * nOctets)) > 0) {
    nOctets++;
  }
  for (int i=nOctets; i > 0; i--) {
    byte octet=(byte)(theValue >> (7 * (i - 1)));
    byte byteValue=(byte)(octet & (byte)0x7f);
    if (i > 1) {
      byteValue=(byte)(byteValue | (byte)0x80);
    }
    theOs.write(byteValue);
  }
}

public static void writeUintvar ( OutputStream theOs , long theValue ) throws IOException { int nOctets = 1 ; while ( ( theValue > > ( 7 * nOctets ) ) > 0 ) { nOctets ++ ; } for ( int i = nOctets ; i > 0 ; i -- ) { byte octet = ( byte ) ( theValue > > ( 7 * ( i - 1 ) ) ) ; byte byteValue = ( byte ) ( octet & ( byte ) 0x7f ) ; if ( i > 1 ) { byteValue = ( byte ) ( byteValue | ( byte ) 0x80 ) ; } theOs . write ( byteValue ) ; } }
writes a " uintvar " in wsp format to the given output stream .
