Title: pojoToJson
20 | *Description:
21 | * @param data 22 | * @return 23 | */ 24 | public static String objectToJson(Object data) { 25 | try { 26 | String string = MAPPER.writeValueAsString(data); 27 | return string; 28 | } catch (JsonProcessingException e) { 29 | e.printStackTrace(); 30 | } 31 | return null; 32 | } 33 | 34 | /** 35 | * 将json结果集转化为对象 36 | * 37 | * @param jsonData json数据 38 | * @param clazz 对象中的object类型 39 | * @return 40 | */ 41 | public staticTitle: jsonToList
54 | *Description:
55 | * @param jsonData 56 | * @param beanType 57 | * @return 58 | */ 59 | public staticipAddress
16 | * @throws IllegalArgumentException if ipAddress is invalid
17 | */
18 | public static long toLong(String ipAddress) {
19 | if (ipAddress == null || ipAddress.isEmpty()) {
20 | throw new IllegalArgumentException("ip address cannot be null or empty");
21 | }
22 | String[] octets = ipAddress.split(java.util.regex.Pattern.quote("."));
23 | if (octets.length != 4) {
24 | throw new IllegalArgumentException("invalid ip address");
25 | }
26 | long ip = 0;
27 | for (int i = 3; i >= 0; i--) {
28 | long octet = Long.parseLong(octets[3 - i]);
29 | if (octet > 255 || octet < 0) {
30 | throw new IllegalArgumentException("invalid ip address");
31 | }
32 | ip |= octet << (i * 8);
33 | }
34 | return ip;
35 | }
36 |
37 | /**
38 | * Returns the 32bit dotted format of the provided long ip.
39 | *
40 | * @param ip the long ip
41 | * @return the 32bit dotted format of ip
42 | * @throws IllegalArgumentException if ip is invalid
43 | */
44 | public static String toString(long ip) {
45 | // if ip is bigger than 255.255.255.255 or smaller than 0.0.0.0
46 | if (ip > 4294967295l || ip < 0) {
47 | throw new IllegalArgumentException("invalid ip");
48 | }
49 | StringBuilder ipAddress = new StringBuilder();
50 | for (int i = 3; i >= 0; i--) {
51 | int shift = i * 8;
52 | ipAddress.append((ip & (0xff << shift)) >> shift);
53 | if (i > 0) {
54 | ipAddress.append(".");
55 | }
56 | }
57 | return ipAddress.toString();
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/Fronkend/plugin/v3.1.6/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
28 |
19 |
18 |
44 |
33 |
34 |