Java Long Number Convert To convertLongToCidr(long unsignedIntCidr)

Here you can find the source of convertLongToCidr(long unsignedIntCidr)

Description

convert Long To Cidr

License

Open Source License

Declaration

public static int convertLongToCidr(long unsignedIntCidr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int convertLongToCidr(long unsignedIntCidr) {

        for (int i = 32; i >= 0; i--) {
            if ((unsignedIntCidr & 0x00000001) == 1)
                return i;
            unsignedIntCidr >>>= 1;
        }//w  w  w .j ava2  s .  c o  m

        return 0;
    }
}

Related

  1. convertLongToBytes(final long unsignedIntIp)
  2. convertLongToBytes(long l)
  3. convertLongToCharSmall(long theLong)
  4. convertLongToDouble(final long[] longs)
  5. convertLongToInt(long l)
  6. convertLongToString(long value)
  7. fromLong(long d)