|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.mvstore.type.ObjectDataType
public class ObjectDataType
A data type implementation for the most common data types, including serializable objects.
| Constructor Summary | |
|---|---|
ObjectDataType()
|
|
| Method Summary | |
|---|---|
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two keys. |
static int |
compareNotNull(byte[] data1,
byte[] data2)
Compare the contents of two byte arrays. |
static java.lang.Object |
deserialize(byte[] data)
De-serialize the byte array to an object. |
int |
getMemory(java.lang.Object obj)
Estimate the used memory in bytes. |
java.lang.Object |
read(java.nio.ByteBuffer buff)
Read an object. |
void |
read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Read a list of objects. |
static byte[] |
serialize(java.lang.Object obj)
Serialize the object to a byte array. |
void |
write(WriteBuffer buff,
java.lang.Object obj)
Write an object. |
void |
write(WriteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
Write a list of objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectDataType()
| Method Detail |
|---|
public int compare(java.lang.Object a,
java.lang.Object b)
DataType
compare in interface DataTypea - the first keyb - the second key
public int getMemory(java.lang.Object obj)
DataType
getMemory in interface DataTypeobj - the object
public void read(java.nio.ByteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
DataType
read in interface DataTypebuff - the target bufferobj - the objectslen - the number of objects to readkey - whether the objects are keys
public void write(WriteBuffer buff,
java.lang.Object[] obj,
int len,
boolean key)
DataType
write in interface DataTypebuff - the target bufferobj - the objectslen - the number of objects to writekey - whether the objects are keys
public void write(WriteBuffer buff,
java.lang.Object obj)
DataType
write in interface DataTypebuff - the target bufferobj - the valuepublic java.lang.Object read(java.nio.ByteBuffer buff)
DataType
read in interface DataTypebuff - the source buffer
public static byte[] serialize(java.lang.Object obj)
obj - the object to serialize
public static java.lang.Object deserialize(byte[] data)
data - the byte array
public 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)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||