Here you can find the source of convertIpPortToUniqueId(byte[] quad, int port)
public static long convertIpPortToUniqueId(byte[] quad, int port)
//package com.java2s; //License from project: Apache License public class Main { public static long convertIpPortToUniqueId(byte[] quad, int port) { return (((long) port) << 32 | ((long) (quad[0] & 0xFF)) << 24 | ((long) (quad[1] & 0xFF)) << 16 | ((long) (quad[2] & 0xFF)) << 8 | ((long) (quad[3] & 0xFF))); }// w ww .jav a2s . c om }