Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / NetAddress.java
index 2cde093aac976425f31851696f39fcee166356c5..3e7d2affb059d6c7cce56df4727c5e28e029248d 100644 (file)
@@ -74,4 +74,33 @@ public class NetAddress extends CommonBase {
                        this.port = obj.port;
                }
        }
+       /**
+        * Creates a copy of the NetAddress
+        */
+       public NetAddress clone() {
+               long ret = bindings.NetAddress_clone(this.ptr);
+               if (ret < 1024) { return null; }
+               NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       /**
+        * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
+        */
+       public byte[] write() {
+               byte[] ret = bindings.NetAddress_write(this.ptr);
+               return ret;
+       }
+
+       /**
+        * Read a NetAddress from a byte array, created by NetAddress_write
+        */
+       public static Result_NetAddressDecodeErrorZ read(byte[] ser) {
+               long ret = bindings.NetAddress_read(ser);
+               if (ret < 1024) { return null; }
+               Result_NetAddressDecodeErrorZ ret_hu_conv = Result_NetAddressDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }