Here you can find the source of inetAddressGt(InetAddress a, InetAddress b)
public final static boolean inetAddressGt(InetAddress a, InetAddress b)
//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; } }