qihoo.open.v1.core
类 ObjectUtils

java.lang.Object
  继承者 qihoo.open.v1.core.ObjectUtils

public final class ObjectUtils
extends Object

Miscellaneous object utility methods the class is writting. from spring source.

作者:
hf.fu

构造方法摘要
ObjectUtils()
           
 
方法摘要
static Object[] addObjectToArray(Object[] array, Object obj)
          Append the given Object to the given array, returning a new array consisting of the input array contents plus the given Object.
static boolean containsElement(Object[] array, Object element)
          Check whether the given array contains the given element
static byte[] encrypt(String content, String keyWord)
           
static String encryptAES(String data, String key)
           
static String encryptMD5(String password)
           
static String encrypttoStr(String content, String password)
           
static boolean equals(Object o1, Object o2)
          check if the given objects are equal
static boolean isCheckedException(Throwable ex)
          Return whether the given throwable is a checked exception
static boolean isEmpty(Collection<?> array)
          return whether the given array is empty
static boolean isEmpty(Object[] array)
          return whether the given array is empty
static String parseByte2HexStr(byte[] buf)
           
static byte[] parseHexStr2Byte(String hexStr)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ObjectUtils

public ObjectUtils()
方法详细信息

isCheckedException

public static boolean isCheckedException(Throwable ex)
Return whether the given throwable is a checked exception


isEmpty

public static boolean isEmpty(Object[] array)
return whether the given array is empty


isEmpty

public static boolean isEmpty(Collection<?> array)
return whether the given array is empty


containsElement

public static boolean containsElement(Object[] array,
                                      Object element)
Check whether the given array contains the given element


equals

public static boolean equals(Object o1,
                             Object o2)
check if the given objects are equal


addObjectToArray

public static Object[] addObjectToArray(Object[] array,
                                        Object obj)
Append the given Object to the given array, returning a new array consisting of the input array contents plus the given Object.

参数:
array -
obj -

encryptMD5

public static String encryptMD5(String password)
                         throws NoSuchAlgorithmException
抛出:
NoSuchAlgorithmException

encryptAES

public static String encryptAES(String data,
                                String key)
                         throws Exception
抛出:
Exception

encrypt

public static byte[] encrypt(String content,
                             String keyWord)

encrypttoStr

public static String encrypttoStr(String content,
                                  String password)

parseByte2HexStr

public static String parseByte2HexStr(byte[] buf)

parseHexStr2Byte

public static byte[] parseHexStr2Byte(String hexStr)


Copyright © 2013. All rights reserved.