Package org.stellar.sdk.xdr
Class DataValue
java.lang.Object
org.stellar.sdk.xdr.DataValue
- All Implemented Interfaces:
XdrElement
DataValue's original definition in the XDR file is:
typedef opaque DataValue<64>;
-
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DataValuedecode(XdrDataInputStream stream) static DataValuedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic DataValuestatic DataValuefromXdrBase64(String xdr) static DataValuefromXdrByteArray(byte[] xdr) byte[]Value of theDataValuefield.inthashCode()voidsetDataValue(byte[] DataValue) Value of theDataValuefield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
DataValue
public DataValue() -
DataValue
public DataValue(byte[] DataValue) Creates a newDataValueinstance.- Parameters:
DataValue- theDataValuefield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
getDataValue
public byte[] getDataValue()Value of theDataValuefield.- Returns:
- the
DataValuefield value
-
setDataValue
public void setDataValue(byte[] DataValue) Value of theDataValuefield.- Parameters:
DataValue- theDataValuefield value
-
equals
-
hashCode
public int hashCode() -
toString
-