public static void putIntUnsigned(ByteBuffer out, int x)
    {
        int more, a;
        
        do 
        {
            a = (x & 0x7F);
            more = (x >>= 7) != 0 ? BYTE_MORE : 0;
            out.put( (byte)(more | a) );    
        }
        while (more != 0);
    }