Package org.bitcoinj.core
Class GetDataMessage
java.lang.Object
org.bitcoinj.core.BaseMessage
org.bitcoinj.core.ListMessage
org.bitcoinj.core.GetDataMessage
- All Implemented Interfaces:
Message
Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their hashes.
Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.
-
Field Summary
Fields inherited from class org.bitcoinj.core.ListMessage
items, MAX_INVENTORY_ITEMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlock
(Sha256Hash hash, boolean includeWitness) Deprecated.void
addFilteredBlock
(Sha256Hash hash) Deprecated.void
addTransaction
(Sha256Hash hash, boolean includeWitness) Deprecated.getHashOf
(int i) static GetDataMessage
ofBlock
(Sha256Hash blockHash, boolean includeWitness) static GetDataMessage
ofTransaction
(Sha256Hash txId, boolean includeWitness) static GetDataMessage
read
(ByteBuffer payload) Deserialize this message from a given payload.Methods inherited from class org.bitcoinj.core.ListMessage
addItem, bitcoinSerializeToStream, equals, getItems, hashCode, readItems, removeItem, toString
Methods inherited from class org.bitcoinj.core.BaseMessage
messageSize, serialize
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bitcoinj.core.Message
bitcoinSerialize, getMessageSize, unsafeBitcoinSerialize
-
Constructor Details
-
GetDataMessage
Deprecated.
-
-
Method Details
-
read
public static GetDataMessage read(ByteBuffer payload) throws BufferUnderflowException, ProtocolException Deserialize this message from a given payload.- Parameters:
payload
- payload to deserialize from- Returns:
- read message
- Throws:
BufferUnderflowException
- if the read message extends beyond the remaining bytes of the payloadProtocolException
-
ofBlock
-
ofTransaction
-
addTransaction
Deprecated. -
addBlock
Deprecated. -
addFilteredBlock
Deprecated. -
getHashOf
-