@@ -37,12 +37,12 @@ public class ConvertUtils {
37
37
* @return 16进制大写字符串
38
38
*/
39
39
public static String bytes2HexString (byte [] bytes ) {
40
- char [] res = new char [bytes .length << 1 ];
40
+ char [] ret = new char [bytes .length << 1 ];
41
41
for (int i = 0 , j = 0 ; i < bytes .length ; i ++) {
42
- res [j ++] = hexDigits [bytes [i ] >>> 4 & 0x0f ];
43
- res [j ++] = hexDigits [bytes [i ] & 0x0f ];
42
+ ret [j ++] = hexDigits [bytes [i ] >>> 4 & 0x0f ];
43
+ ret [j ++] = hexDigits [bytes [i ] & 0x0f ];
44
44
}
45
- return new String (res );
45
+ return new String (ret );
46
46
}
47
47
48
48
/**
@@ -59,11 +59,11 @@ public static byte[] hexString2Bytes(String hexString) {
59
59
throw new IllegalArgumentException ("长度不是偶数" );
60
60
}
61
61
char [] hexBytes = hexString .toUpperCase ().toCharArray ();
62
- byte [] res = new byte [len >>> 1 ];
62
+ byte [] ret = new byte [len >>> 1 ];
63
63
for (int i = 0 ; i < len ; i += 2 ) {
64
- res [i >> 1 ] = (byte ) (hex2Dec (hexBytes [i ]) << 4 | hex2Dec (hexBytes [i + 1 ]));
64
+ ret [i >> 1 ] = (byte ) (hex2Dec (hexBytes [i ]) << 4 | hex2Dec (hexBytes [i + 1 ]));
65
65
}
66
- return res ;
66
+ return ret ;
67
67
}
68
68
69
69
/**
@@ -308,12 +308,12 @@ public static Bitmap drawable2Bitmap(Drawable drawable) {
308
308
/**
309
309
* bitmap转drawable
310
310
*
311
- * @param resources resources对象
312
- * @param bitmap bitmap对象
311
+ * @param res resources对象
312
+ * @param bitmap bitmap对象
313
313
* @return drawable对象
314
314
*/
315
- public static Drawable bitmap2Drawable (Resources resources , Bitmap bitmap ) {
316
- return bitmap == null ? null : new BitmapDrawable (resources , bitmap );
315
+ public static Drawable bitmap2Drawable (Resources res , Bitmap bitmap ) {
316
+ return bitmap == null ? null : new BitmapDrawable (res , bitmap );
317
317
}
318
318
319
319
/**
@@ -330,12 +330,12 @@ public static byte[] drawable2Bytes(Drawable drawable, Bitmap.CompressFormat for
330
330
/**
331
331
* byteArr转drawable
332
332
*
333
- * @param resources resources对象
334
- * @param bytes 字节数组
333
+ * @param res resources对象
334
+ * @param bytes 字节数组
335
335
* @return drawable对象
336
336
*/
337
- public static Drawable bytes2Drawable (Resources resources , byte [] bytes ) {
338
- return bitmap2Drawable (resources , bytes2Bitmap (bytes ));
337
+ public static Drawable bytes2Drawable (Resources res , byte [] bytes ) {
338
+ return bitmap2Drawable (res , bytes2Bitmap (bytes ));
339
339
}
340
340
341
341
/**
0 commit comments