Java InetAddress inetAddressGt(InetAddress a, InetAddress b)

Here you can find the source of inetAddressGt(InetAddress a, InetAddress b)

Description

inet Address Gt

License

Apache License

Declaration

public final static boolean inetAddressGt(InetAddress a, InetAddress b) 

Method Source Code

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

import java.net.InetAddress;

public class Main {
    public final static boolean inetAddressGt(InetAddress a, InetAddress b) {
        return !inetAddressLeq(a, b);
    }//from   ww w  .ja  v a 2 s.c  om

    public final static boolean inetAddressLeq(InetAddress a_, InetAddress b_) {
        byte[] a = a_.getAddress();
        byte[] b = b_.getAddress();
        for (int i = 0; i < a.length; i++)
            if (a[i] > b[i])
                return false;
        return true;
    }
}

Related

  1. increment(InetAddress address)
  2. inetAddressCompare(final InetAddress address1, final InetAddress address2)
  3. inetAddressesComparator(final boolean sameHost)
  4. inetAddressesCompare(final InetAddress[] addresses1, final InetAddress[] addresses2)
  5. inetAddressFromThriftString(String ipAddress)
  6. inetAddrToByteArray(InetAddress a)
  7. minus(InetAddress[] a_, InetAddress[] b)
  8. newInterfaceAddress(InetAddress inetAddress, short maskLength)
  9. normalizeHostAddress(final InetAddress localHost)