Java Long to long2dotted(long address)

Here you can find the source of long2dotted(long address)

Description

longdotted

License

Apache License

Declaration

public static String long2dotted(long address) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String long2dotted(long address) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0, shift = 24; i < 4; i++, shift -= 8) {
            long value = (address >> shift) & 0xff;
            sb.append(value);/* ww  w.  ja v a2  s  .  c  om*/
            if (i != 3) {
                sb.append('.');
            }
        }
        return sb.toString();
    }
}

Related

  1. long2Arr(long var, byte[] arrayBytes, int startIndex)
  2. long2array(int sz, long seed)
  3. long2buff(long n)
  4. long2char(long x)
  5. long2Date(Long date, String interval)
  6. long2FourChars(long i)
  7. Long2H(final long l)
  8. long2leb(final long x, final byte[] buf, final int offset)
  9. long2longArr(long val, long[] res)