|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 把逗号分隔的字符串转换字符串数组 | 
|---|
|  |  |  | * Convert comma-separated string to string array. | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param str | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static String[] splitStr2StrArr(String str,String split) { | 
|---|
|  |  |  | public static String[] splitStr2StrArr(String str, String split) { | 
|---|
|  |  |  | if (str != null && !str.equals("")) { | 
|---|
|  |  |  | return str.split(split); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static List<Long> splitStr2LongArr(String str) { | 
|---|
|  |  |  | String[] strings = splitStr2StrArr(str,","); | 
|---|
|  |  |  | String[] strings = splitStr2StrArr(str, ","); | 
|---|
|  |  |  | if (strings == null) return null; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Long> result = new ArrayList<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 把逗号分隔字符串转换List的Long | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param str | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public static List<Long> splitStr2LongArr(String str,String split) { | 
|---|
|  |  |  | String[] strings = splitStr2StrArr(str,split); | 
|---|
|  |  |  | public static List<Long> splitStr2LongArr(String str, String split) { | 
|---|
|  |  |  | String[] strings = splitStr2StrArr(str, split); | 
|---|
|  |  |  | if (strings == null) return null; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<Long> result = new ArrayList<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return sb.toString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getClassCodeString(int length) { | 
|---|
|  |  |  | String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | 
|---|
|  |  |  | Random random = new Random(); | 
|---|
|  |  |  | StringBuffer sb = new StringBuffer(); | 
|---|
|  |  |  | for (int i = 0; i < length; i++) { | 
|---|
|  |  |  | int number =random.nextInt(36); | 
|---|
|  |  |  | int number = random.nextInt(36); | 
|---|
|  |  |  | sb.append(str.charAt(number)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return sb.toString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String convertPropertiesToHtml(String properties){ | 
|---|
|  |  |  | public static String convertPropertiesToHtml(String properties) { | 
|---|
|  |  |  | //1:容量:6:32GB_4:样式:12:塑料壳 | 
|---|
|  |  |  | StringBuilder sBuilder = new StringBuilder(); | 
|---|
|  |  |  | String[] propArr = properties.split("_"); | 
|---|