Class RootNamespaceHistoryBuilder

  • All Implemented Interfaces:
    Serializer

    public class RootNamespaceHistoryBuilder
    extends java.lang.Object
    implements Serializer
    Binary layout for non-historical root namespace history
    • Constructor Detail

      • RootNamespaceHistoryBuilder

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

        protected RootNamespaceHistoryBuilder​(NamespaceIdDto id,
                                              KeyDto ownerPublicKey,
                                              NamespaceLifetimeBuilder lifetime,
                                              NamespaceAliasTypeDto rootAlias,
                                              java.util.List<NamespacePathBuilder> paths)
        Constructor.
        Parameters:
        id - Id of the root namespace history.
        ownerPublicKey - Namespace owner public key.
        lifetime - Lifetime in blocks.
        rootAlias - Root namespace alias.
        paths - Save child sub-namespace paths.
    • Method Detail

      • loadFromBinary

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

        public NamespaceIdDto getId()
        Gets id of the root namespace history.
        Returns:
        Id of the root namespace history.
      • getOwnerPublicKey

        public KeyDto getOwnerPublicKey()
        Gets namespace owner public key.
        Returns:
        Namespace owner public key.
      • getRootAlias

        public NamespaceAliasTypeDto getRootAlias()
        Gets root namespace alias.
        Returns:
        Root namespace alias.
      • getPaths

        public java.util.List<NamespacePathBuilder> getPaths()
        Gets save child sub-namespace paths.
        Returns:
        Save child sub-namespace paths.
      • 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.