Class VotingKeyV1Dto

  • All Implemented Interfaces:
    Serializer

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

      Constructors 
      Constructor Description
      VotingKeyV1Dto​(java.io.DataInputStream stream)
      Constructor - Creates an object from stream.
      VotingKeyV1Dto​(java.nio.ByteBuffer votingKeyV1)
      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 getVotingKeyV1()
      Gets Voting key v1.
      static VotingKeyV1Dto loadFromBinary​(java.io.DataInputStream stream)
      Creates an instance of VotingKeyV1Dto 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

      • VotingKeyV1Dto

        public VotingKeyV1Dto​(java.nio.ByteBuffer votingKeyV1)
        Constructor.
        Parameters:
        votingKeyV1 - Voting key v1.
      • VotingKeyV1Dto

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

      • getVotingKeyV1

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

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

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

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