Package org.ldk.structs
Class BigSize
- java.lang.Object
-
- org.ldk.structs.BigSize
-
public class BigSize extends Object
Lightning TLV uses a custom variable-length integer called `BigSize`. It is similar to Bitcoin's variable-length integers except that it is serialized in big-endian instead of little-endian. Like Bitcoin's variable-length integer, it exhibits ambiguity in that certain values can be encoded in several different ways, which we must check for at deserialization-time. Thus, if you're looking for an example of a variable-length integer to use for your own project, move along, this is a rather poor design.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BigSizeclone()Creates a copy of the BigSizebooleaneq(BigSize b)Checks if two BigSizes contain equal inner contents.booleanequals(Object o)protected voidfinalize()longget_a()longhash()Generates a non-cryptographic 64-bit hash of the BigSize.inthashCode()static BigSizeof(long a_arg)Constructs a new BigSize given each fieldstatic Result_BigSizeDecodeErrorZread(byte[] ser)Read a BigSize from a byte array, created by BigSize_writevoidset_a(long val)byte[]write()Serialize the BigSize object into a byte array which can be read by BigSize_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_a
public long get_a()
-
set_a
public void set_a(long val)
-
of
public static BigSize of(long a_arg)
Constructs a new BigSize given each field
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the BigSize.
-
eq
public boolean eq(BigSize b)
Checks if two BigSizes contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
-
write
public byte[] write()
Serialize the BigSize object into a byte array which can be read by BigSize_read
-
read
public static Result_BigSizeDecodeErrorZ read(byte[] ser)
Read a BigSize from a byte array, created by BigSize_write
-
-