Package org.bitcoinj.core
Class Ping
- java.lang.Object
-
- org.bitcoinj.core.Message
-
- org.bitcoinj.core.Ping
-
-
Field Summary
-
Fields inherited from class org.bitcoinj.core.Message
MAX_SIZE, params, payload, serializer
-
-
Constructor Summary
Constructors Constructor Description Ping()Create a Ping with a random nonce value.Ping(long nonce)Create a Ping with a given nonce value.Ping(NetworkParameters params, java.nio.ByteBuffer payload)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidbitcoinSerializeToStream(java.io.OutputStream stream)Serializes this message to the provided stream.longgetNonce()booleanhasNonce()Deprecated.returns trueprotected voidparse()-
Methods inherited from class org.bitcoinj.core.Message
bitcoinSerialize, getHash, getMessageSize, getParams, readByte, readByteArray, readBytes, readHash, readInt32, readInt64, readStr, readUint32, readUint64, readVarInt, skipBytes, unCache, unsafeBitcoinSerialize
-
-
-
-
Constructor Detail
-
Ping
public Ping(NetworkParameters params, java.nio.ByteBuffer payload) throws ProtocolException
- Throws:
ProtocolException
-
Ping
public Ping(long nonce)
Create a Ping with a given nonce value.
-
Ping
public Ping()
Create a Ping with a random nonce value.
-
-
Method Detail
-
bitcoinSerializeToStream
public void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOExceptionDescription copied from class:MessageSerializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().- Overrides:
bitcoinSerializeToStreamin classMessage- Throws:
java.io.IOException
-
parse
protected void parse() throws java.nio.BufferUnderflowException, ProtocolException- Specified by:
parsein classMessage- Throws:
java.nio.BufferUnderflowExceptionProtocolException
-
hasNonce
@Deprecated public boolean hasNonce()
Deprecated.returns true
-
getNonce
public long getNonce()
-
-