1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class Pong extends CommonBase {
10 Pong(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.Pong_free(ptr); }
18 long ret = bindings.Pong_clone(this.ptr);
19 Pong ret_hu_conv = new Pong(null, ret);
20 ret_hu_conv.ptrs_to.add(this);
24 public short get_byteslen() {
25 short ret = bindings.Pong_get_byteslen(this.ptr);
29 public void set_byteslen(short val) {
30 bindings.Pong_set_byteslen(this.ptr, val);
33 public static Pong constructor_new(short byteslen_arg) {
34 long ret = bindings.Pong_new(byteslen_arg);
35 Pong ret_hu_conv = new Pong(null, ret);
36 ret_hu_conv.ptrs_to.add(ret_hu_conv);
40 public byte[] write() {
41 byte[] ret = bindings.Pong_write(this.ptr);
45 public static Result_PongDecodeErrorZ constructor_read(byte[] ser) {
46 long ret = bindings.Pong_read(ser);
47 Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);