android/guava/src/com/google/common/net/InetAddresses.java
public static InetAddress fromLittleEndianByteArray(byte[] addr) throws UnknownHostException {
    byte[] reversed = new byte[addr.length];
    for (int i = 0; i < addr.length; i++) {
      reversed[i] = addr[addr.length - i - 1];
    }
    return InetAddress.getByAddress(reversed);
  }
public static InetAddress fromLittleEndianByteArray(byte[] addr) throws UnknownHostException {
    byte[] reversed = new byte[addr.length];
    for (int i = 0; i < addr.length; i++) {
      reversed[i] = addr[addr.length - i - 1];
    }
    return InetAddress.getByAddress(reversed);
  }
Returns an address from a <b>little-endian ordered</b> byte array (the opposite of what {@link
InetAddress#getByAddress} expects).

<p>IPv4 address byte array must be 4 bytes long and IPv6 byte array must be 16 bytes long.

@param addr the raw IP address in little-endian byte order
@return an InetAddress object created from the raw IP address
@throws UnknownHostException if IP address is of illegal length