public class Ping extends Message
Instances of this class are not safe for use by multiple threads.
cursor, length, MAX_SIZE, offset, params, payload, recached, serializer, UNKNOWN_LENGTH
Constructor and Description |
---|
Ping()
Create a Ping without a nonce value.
|
Ping(long nonce)
Create a Ping with a nonce value.
|
Ping(NetworkParameters params,
byte[] payloadBytes) |
Modifier and Type | Method and Description |
---|---|
void |
bitcoinSerializeToStream(java.io.OutputStream stream)
Serializes this message to the provided stream.
|
long |
getNonce() |
boolean |
hasNonce() |
protected void |
parse() |
adjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByte, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, setSerializer, unCache, unsafeBitcoinSerialize
public Ping(NetworkParameters params, byte[] payloadBytes) throws ProtocolException
ProtocolException
public Ping(long nonce)
public Ping()
public void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOException
Message
bitcoinSerializeToStream
in class Message
java.io.IOException
protected void parse() throws ProtocolException
parse
in class Message
ProtocolException
public boolean hasNonce()
public long getNonce()