@@ -37,12 +37,12 @@ public class ConvertUtils {
3737 * @return 16进制大写字符串
3838 */
3939 public static String bytes2HexString (byte [] bytes ) {
40- char [] res = new char [bytes .length << 1 ];
40+ char [] ret = new char [bytes .length << 1 ];
4141 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 ];
4444 }
45- return new String (res );
45+ return new String (ret );
4646 }
4747
4848 /**
@@ -59,11 +59,11 @@ public static byte[] hexString2Bytes(String hexString) {
5959 throw new IllegalArgumentException ("长度不是偶数" );
6060 }
6161 char [] hexBytes = hexString .toUpperCase ().toCharArray ();
62- byte [] res = new byte [len >>> 1 ];
62+ byte [] ret = new byte [len >>> 1 ];
6363 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 ]));
6565 }
66- return res ;
66+ return ret ;
6767 }
6868
6969 /**
@@ -308,12 +308,12 @@ public static Bitmap drawable2Bitmap(Drawable drawable) {
308308 /**
309309 * bitmap转drawable
310310 *
311- * @param resources resources对象
312- * @param bitmap bitmap对象
311+ * @param res resources对象
312+ * @param bitmap bitmap对象
313313 * @return drawable对象
314314 */
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 );
317317 }
318318
319319 /**
@@ -330,12 +330,12 @@ public static byte[] drawable2Bytes(Drawable drawable, Bitmap.CompressFormat for
330330 /**
331331 * byteArr转drawable
332332 *
333- * @param resources resources对象
334- * @param bytes 字节数组
333+ * @param res resources对象
334+ * @param bytes 字节数组
335335 * @return drawable对象
336336 */
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 ));
339339 }
340340
341341 /**
0 commit comments