Back to project page bitcoin-wallet.
The source code is released under:
Copyright (C) 2011 by Caleb Anderson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the ...
If you think the Android project bitcoin-wallet listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.dirtyfilthy.bitcoin.protocol; // www . j av a 2s . c o m import java.io.IOException; import java.io.DataInputStream; public class ReplyPacket extends Packet { private int replyCode; static public final int SUCCESS=0; static public final int ERROR=1; static public final int DENIED=2; public ReplyPacket() { super(); command="reply"; setReplyCode(DENIED); } public ReplyPacket(long ver) { super(ver,"reply"); setReplyCode(DENIED); } public void setReplyCode(int replyCode) { this.replyCode = replyCode; } public int getReplyCode() { return replyCode; } public byte[] create(){ dataBuffer.putInt(replyCode); return toByteArray(); } public void readData(DataInputStream in) throws IOException{ this.setReplyCode(Integer.reverseBytes(in.readInt())); } }