public abstract class Data extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
abstract Record.TYPE |
getType()
The payload type.
|
int |
hashCode() |
int |
length() |
protected abstract void |
serialize(DataOutputStream dos)
The internal method used to serialize Data subclasses.
|
byte[] |
toByteArray() |
void |
toOutputStream(DataOutputStream dos)
Write the binary representation of this payload to the given
DataOutputStream . |
public abstract Record.TYPE getType()
protected abstract void serialize(DataOutputStream dos) throws IOException
dos
- the output stream to serialize to.IOException
- if an I/O error occurs.public final int length()
public void toOutputStream(DataOutputStream dos) throws IOException
DataOutputStream
.dos
- the DataOutputStream to write to.IOException
- if an I/O error occurs.public final byte[] toByteArray()