Class TimestampDto

  • All Implemented Interfaces:
    Serializer

    public final class TimestampDto
    extends java.lang.Object
    implements Serializer
    Timestamp.
    • Constructor Summary

      Constructors 
      Constructor Description
      TimestampDto​(long timestamp)
      Constructor.
      TimestampDto​(java.io.DataInputStream stream)
      Constructor - Creates an object from stream.
    • Constructor Detail

      • TimestampDto

        public TimestampDto​(long timestamp)
        Constructor.
        Parameters:
        timestamp - Timestamp.
      • TimestampDto

        public TimestampDto​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize.
    • Method Detail

      • getTimestamp

        public long getTimestamp()
        Gets Timestamp.
        Returns:
        Timestamp.
      • getSize

        public int getSize()
        Gets the size of the object.
        Specified by:
        getSize in interface Serializer
        Returns:
        Size in bytes.
      • loadFromBinary

        public static TimestampDto loadFromBinary​(java.io.DataInputStream stream)
        Creates an instance of TimestampDto from a stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
        Returns:
        Instance of TimestampDto.
      • serialize

        public byte[] serialize()
        Serializes an object to bytes.
        Specified by:
        serialize in interface Serializer
        Returns:
        Serialized bytes.