com.github.DNAProject.core.governance.GovernanceView Maven / Gradle / Ivy
The newest version!
package com.github.DNAProject.core.governance;
import com.github.DNAProject.common.UInt256;
import com.github.DNAProject.io.BinaryReader;
import com.github.DNAProject.io.BinaryWriter;
import com.github.DNAProject.io.Serializable;
import java.io.IOException;
public class GovernanceView implements Serializable {
public int view;
public int height;
public UInt256 txhash;
public GovernanceView(){
}
GovernanceView(int view,int height,UInt256 txhash){
this.view = view;
this.height = height;
this.txhash = txhash;
}
@Override
public void deserialize(BinaryReader reader) throws IOException {
this.view = reader.readInt();
this.height = reader.readInt();
try {
this.txhash = reader.readSerializable(UInt256.class);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
@Override
public void serialize(BinaryWriter writer) throws IOException {
writer.writeInt(view);
writer.writeInt(height);
writer.writeSerializable(txhash);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy