public final class ObjectKit extends Object
| Constructor and Description |
|---|
ObjectKit() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Serializable> |
clone(T obj)
Clone 一个对象
|
static byte[] |
toByteArray(Object obj)
对象转数组
|
static byte[] |
toCompressByteArray(Object obj)
对象转数组
|
static byte[] |
toCompressByteArray(Object obj,
String password)
对象转数组
|
static <T> T |
toDecompressObject(byte[] bytes)
byte数组转对象
|
static <T> T |
toDecompressObject(byte[] bytes,
String password)
byte数组转对象
|
static Map |
toMap(Object obj)
object 转化为 map,借助jackson
|
static <T> T |
toObject(byte[] bytes)
byte数组转对象
|
public static byte[] toByteArray(Object obj)
obj - public static <T> T toObject(byte[] bytes)
bytes - public static byte[] toCompressByteArray(Object obj)
obj - public static <T> T toDecompressObject(byte[] bytes)
bytes - public static byte[] toCompressByteArray(Object obj, String password)
obj - password - 加密密码public static <T> T toDecompressObject(byte[] bytes,
String password)
bytes - password - 加密密码public <T extends Serializable> T clone(T obj)
T - obj - Copyright © 2020. All rights reserved.