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