| 构造器和说明 |
|---|
ObjectDataType() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compare(Object a,
Object b)
Compare two keys.
|
static int |
compareNotNull(byte[] data1,
byte[] data2)
Compare the contents of two byte arrays.
|
static Object |
deserialize(byte[] data)
De-serialize the byte array to an object.
|
int |
getMemory(Object obj)
Estimate the used memory in bytes.
|
Object |
read(ByteBuffer buff)
Read an object.
|
void |
read(ByteBuffer buff,
Object[] obj,
int len,
boolean key)
Read a list of objects.
|
static byte[] |
serialize(Object obj)
Serialize the object to a byte array.
|
void |
write(WriteBuffer buff,
Object obj)
Write an object.
|
void |
write(WriteBuffer buff,
Object[] obj,
int len,
boolean key)
Write a list of objects.
|
public void read(ByteBuffer buff, Object[] obj, int len, boolean key)
DataTypepublic void write(WriteBuffer buff, Object[] obj, int len, boolean key)
DataTypepublic void write(WriteBuffer buff, Object obj)
DataTypepublic Object read(ByteBuffer buff)
DataTypepublic static byte[] serialize(Object obj)
obj - the object to serializepublic static Object deserialize(byte[] data)
data - the byte arraypublic static int compareNotNull(byte[] data1,
byte[] data2)
This method interprets bytes as unsigned.
data1 - the first byte array (must not be null)data2 - the second byte array (must not be null)Copyright © 2017. All rights reserved.