()
| 33 | "U", "V", "W", "X", "Y", "Z" }; |
| 34 | |
| 35 | public static String getShortUuid() { |
| 36 | StringBuffer shortBuffer = new StringBuffer(); |
| 37 | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| 38 | for (int i = 0; i < 8; i++) { |
| 39 | String str = uuid.substring(i * 4, i * 4 + 4); |
| 40 | int x = Integer.parseInt(str, 16); |
| 41 | shortBuffer.append(chars[x % 0x3E]); |
| 42 | } |
| 43 | return shortBuffer.toString(); |
| 44 | } |
| 45 | |
| 46 | public static String get32UUID() { |
| 47 | String uuid = UUID.randomUUID().toString().trim().replaceAll("-", ""); |
no test coverage detected