public class DIOSerializableObjectSerde extends Object implements DataInputOutputSerde
ObjectInputStream
and ObjectOutputStream
.Modifier and Type | Field and Description |
---|---|
static EPTypeClass |
EPTYPE |
static DIOSerializableObjectSerde |
INSTANCE
Instance.
|
Modifier and Type | Method and Description |
---|---|
static Object |
byteArrToObject(byte[] bytes)
Deserialize byte arry to object.
|
static Object |
deserializeFrom(DataInput input)
Deserialize object
|
static byte[] |
objectToByteArr(Object underlying)
Serialize object to byte array.
|
Object |
read(DataInput input,
byte[] resourceKey)
Read an object from the stream.
|
static void |
serializeTo(Object value,
DataOutput output)
Serialize object
|
void |
write(Object object,
DataOutput output,
byte[] pageFullKey,
EventBeanCollatedWriter writer)
Write an object to the stream.
|
public static final EPTypeClass EPTYPE
public static final DIOSerializableObjectSerde INSTANCE
public void write(Object object, DataOutput output, byte[] pageFullKey, EventBeanCollatedWriter writer) throws IOException
DataInputOutputSerde
write
in interface DataInputOutputSerde
object
- to write or null if this is a nullable valueoutput
- to write topageFullKey
- the page key of the page containing the object, can be null if not relevant or not providedwriter
- the writer for events, can be null if not relevant or not providedIOException
- for io exceptionspublic Object read(DataInput input, byte[] resourceKey) throws IOException
DataInputOutputSerde
read
in interface DataInputOutputSerde
input
- input to readresourceKey
- the identifying key of the reader, can be null if not relevant or not providedIOException
- for io exceptionspublic static byte[] objectToByteArr(Object underlying)
underlying
- to serializepublic static Object byteArrToObject(byte[] bytes)
bytes
- to readpublic static void serializeTo(Object value, DataOutput output) throws IOException
value
- value to serializeoutput
- output streamIOException
- when a problem occurspublic static Object deserializeFrom(DataInput input) throws IOException
input
- input streamIOException
- when a problem occursCopyright © 2005–2021. All rights reserved.