@@ -0,0 +1,648 @@
+package com.velo.cityon.api.util;%0D%0A%0D%0Aimport java.net.InetAddress;%0D%0Aimport java.net.UnknownHostException;%0D%0A%0D%0Apublic class Uid %7B%0D%0A%09private static String addr = %220000%22;%0D%0A%09private static Integer seq = 0;%0D%0A%09%0D%0A%09static %7B%0D%0A%09%09try %7B%0D%0A%09%09%09byte%5B%5D addrByte = InetAddress.getLocalHost().getAddress();%0D%0A%09%09%09addr = String.format(%22%2502x%2502x%22, addrByte%5B2%5D, addrByte%5B3%5D);%0D%0A%09%09%7D catch (UnknownHostException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09public static synchronized String getUid() %7B%0D%0A%09%09String time = String.format(%22%25012x%22, System.currentTimeMillis());%0D%0A%09%09String seqStr = String.format(%22%2502x%22, 0xFF & seq++);%0D%0A%09%09return time + %22-%22 + addr + %22-%22 + seqStr;%0D%0A%09%7D%0D%0A%7D%0D%0A

add uid util