Package io.nem.symbol.catapult.builders
Class Hash256Dto
- java.lang.Object
-
- io.nem.symbol.catapult.builders.Hash256Dto
-
- All Implemented Interfaces:
Serializer
public final class Hash256Dto extends java.lang.Object implements Serializer
Hash256.
-
-
Constructor Summary
Constructors Constructor Description Hash256Dto(java.io.DataInputStream stream)Constructor - Creates an object from stream.Hash256Dto(java.nio.ByteBuffer hash256)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffergetHash256()Gets Hash256.intgetSize()Gets the size of the object.static Hash256DtoloadFromBinary(java.io.DataInputStream stream)Creates an instance of Hash256Dto from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Method Detail
-
getHash256
public java.nio.ByteBuffer getHash256()
Gets Hash256.- Returns:
- Hash256.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Returns:
- Size in bytes.
-
loadFromBinary
public static Hash256Dto loadFromBinary(java.io.DataInputStream stream)
Creates an instance of Hash256Dto from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of Hash256Dto.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
-