Class AccountRestrictionsBuilder

  • All Implemented Interfaces:
    Serializer

    public class AccountRestrictionsBuilder
    extends java.lang.Object
    implements Serializer
    Binary layout for account restrictions
    • Constructor Detail

      • AccountRestrictionsBuilder

        protected AccountRestrictionsBuilder​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
      • AccountRestrictionsBuilder

        protected AccountRestrictionsBuilder​(AddressDto address,
                                             java.util.List<AccountRestrictionsInfoBuilder> restrictions)
        Constructor.
        Parameters:
        address - Address on which restrictions are placed.
        restrictions - Account restrictions.
    • Method Detail

      • loadFromBinary

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

        public static AccountRestrictionsBuilder create​(AddressDto address,
                                                        java.util.List<AccountRestrictionsInfoBuilder> restrictions)
        Creates an instance of AccountRestrictionsBuilder.
        Parameters:
        address - Address on which restrictions are placed.
        restrictions - Account restrictions.
        Returns:
        Instance of AccountRestrictionsBuilder.
      • getAddress

        public AddressDto getAddress()
        Gets address on which restrictions are placed.
        Returns:
        Address on which restrictions are placed.
      • getSize

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

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