Class AddressDto

  • All Implemented Interfaces:
    Serializer

    public final class AddressDto
    extends java.lang.Object
    implements Serializer
    Address.
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer getAddress()
      Gets Address.
      int getSize()
      Gets the size of the object.
      static AddressDto loadFromBinary​(java.io.DataInputStream stream)
      Creates an instance of AddressDto 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

      • AddressDto

        public AddressDto​(java.nio.ByteBuffer address)
        Constructor.
        Parameters:
        address - Address.
      • AddressDto

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

      • getAddress

        public java.nio.ByteBuffer getAddress()
        Gets Address.
        Returns:
        Address.
      • getSize

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

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

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