Class VotingKeyDto

  • All Implemented Interfaces:
    Serializer

    public final class VotingKeyDto
    extends java.lang.Object
    implements Serializer
    Voting key.
    • Constructor Summary

      Constructors 
      Constructor Description
      VotingKeyDto​(java.io.DataInputStream stream)
      Constructor - Creates an object from stream.
      VotingKeyDto​(java.nio.ByteBuffer votingKey)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSize()
      Gets the size of the object.
      java.nio.ByteBuffer getVotingKey()
      Gets Voting key.
      static VotingKeyDto loadFromBinary​(java.io.DataInputStream stream)
      Creates an instance of VotingKeyDto from a stream.
      byte[] serialize()
      Serializes an object to bytes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VotingKeyDto

        public VotingKeyDto​(java.nio.ByteBuffer votingKey)
        Constructor.
        Parameters:
        votingKey - Voting key.
      • VotingKeyDto

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

      • getVotingKey

        public java.nio.ByteBuffer getVotingKey()
        Gets Voting key.
        Returns:
        Voting key.
      • getSize

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

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

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