Class Data

    • Constructor Detail

      • Data

        public Data()
    • Method Detail

      • getType

        public abstract Record.TYPE getType()
        The payload type.
        Returns:
        The payload type.
      • serialize

        protected abstract void serialize​(DataOutputStream dos)
                                   throws IOException
        The internal method used to serialize Data subclasses.
        Parameters:
        dos - the output stream to serialize to.
        Throws:
        IOException - if an I/O error occurs.
      • length

        public final int length()
      • toOutputStream

        public final void toOutputStream​(DataOutputStream dos)
                                  throws IOException
        Write the binary representation of this payload to the given DataOutputStream.
        Parameters:
        dos - the DataOutputStream to write to.
        Throws:
        IOException - if an I/O error occurs.
      • toByteArray

        public final byte[] toByteArray()
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object other)
        Overrides:
        equals in class Object