public class PreImageData extends JSONParsable
Constructor and Description |
---|
PreImageData()
Empty Constructor
|
PreImageData(byte[] preImage,
byte[] preImageHash)
Default constructor
|
PreImageData(javax.json.JsonObject jsonObject)
Json Parsable constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
byte[] |
getPreImage() |
byte[] |
getPreImageHash() |
void |
parseJson(javax.json.JsonObject o)
Method to read all properties from a JsonObject into this value object.
|
void |
setPreImage(byte[] preImage) |
void |
setPreImageHash(byte[] preImageHash) |
add, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toString
public PreImageData()
public PreImageData(javax.json.JsonObject jsonObject) throws javax.json.JsonException
jsonObject
- the json data to parse.javax.json.JsonException
- if problem occurred parsing.public PreImageData(byte[] preImage, byte[] preImageHash)
preImage
- The secret pre image value for a given invoice or payment.preImageHash
- Hash value of given pre image hash.public byte[] getPreImage()
public void setPreImage(byte[] preImage)
preImage
- The secret pre image value for a given invoice or payment.public byte[] getPreImageHash()
public void setPreImageHash(byte[] preImageHash)
preImageHash
- Hash value of given pre image hash.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class JSONParsable
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject o) throws javax.json.JsonException
parseJson
in class JSONParsable
o
- the json object to read key and values from and set object properties.javax.json.JsonException
- if problems occurred converting object from JSON.