Java Integer Format formatIntAsDottedOctet(int value)

Here you can find the source of formatIntAsDottedOctet(int value)

Description

format Int As Dotted Octet

License

Apache License

Declaration

public static String formatIntAsDottedOctet(int value) 

Method Source Code

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

public class Main {

    public static String formatIntAsDottedOctet(int value) {
        return Integer.toString((value >> 24) & 0xff) + "."
                + Integer.toString((value >> 16) & 0xff) + "."
                + Integer.toString((value >> 8) & 0xff) + "."
                + Integer.toString((value >> 0) & 0xff);
    }/*from w  w w.  java2  s  .c o  m*/
}

Related

  1. formatInt(String value)
  2. formatInt(String value)
  3. formatInt(String value, int defaultValue)
  4. formatInt2(int n)
  5. formatInt64(long val)
  6. formatIntAsIpAddress(final int address)
  7. formatInteger(byte[] btValue, int iOffset, int iLength)
  8. formatInteger(int i, int j)
  9. formatInteger(int inInt, int inLen, boolean inComma, int inCommaPos)