Java Byte Array Convert To bytes2IPV4(byte[] addr, int offset)

Here you can find the source of bytes2IPV4(byte[] addr, int offset)

Description

bytes IPV

License

Open Source License

Declaration

public static final String bytes2IPV4(byte[] addr, int offset) 

Method Source Code

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

public class Main {
    public static final String bytes2IPV4(byte[] addr, int offset) {
        String hostName = "" + (addr[offset] & 0xFF);
        for (int i = offset + 1; i < offset + 4; i++) {
            hostName += "." + (addr[i] & 0xFF);
        }/*from   w w w  . j a v  a 2  s  .  co m*/
        return hostName;
    }
}

Related

  1. bytes2byteArray(byte[] bytes, byte separator)
  2. bytes2Chars(byte[] bytes)
  3. bytes2humanReadable(long bytes)
  4. bytes2intLE(byte[] bytes, int offset, int len)
  5. bytes2ip(byte[] bytes)
  6. bytes2nibbles(byte[] bytes)
  7. bytes2unique(byte[] daten, int offset)
  8. Bytes4ToInt(byte abyte0[], int offset)
  9. Bytes8ToLong(byte abyte0[], int offset)