Package org.bitcoinj.core
Class GetDataMessage
- java.lang.Object
- 
- org.bitcoinj.core.Message
- 
- org.bitcoinj.core.ListMessage
- 
- org.bitcoinj.core.GetDataMessage
 
 
 
- 
 public class GetDataMessage extends ListMessage Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their hashes. Instances of this class are not safe for use by multiple threads. 
- 
- 
Field Summary- 
Fields inherited from class org.bitcoinj.core.ListMessageitems, MAX_INVENTORY_ITEMS
 - 
Fields inherited from class org.bitcoinj.core.MessageMAX_SIZE, params, payload, serializer
 
- 
 - 
Constructor SummaryConstructors Constructor Description GetDataMessage(NetworkParameters params)GetDataMessage(NetworkParameters params, java.nio.ByteBuffer payload)GetDataMessage(NetworkParameters params, java.nio.ByteBuffer payload, MessageSerializer serializer)Deserializes a 'getdata' message.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBlock(Sha256Hash hash, boolean includeWitness)voidaddFilteredBlock(Sha256Hash hash)voidaddTransaction(Sha256Hash hash, boolean includeWitness)Sha256HashgetHashOf(int i)- 
Methods inherited from class org.bitcoinj.core.ListMessageaddItem, bitcoinSerializeToStream, equals, getItems, hashCode, parse, removeItem, toString
 - 
Methods inherited from class org.bitcoinj.core.MessagebitcoinSerialize, getHash, getMessageSize, getParams, readByte, readByteArray, readBytes, readHash, readInt32, readInt64, readStr, readUint32, readUint64, readVarInt, skipBytes, unCache, unsafeBitcoinSerialize
 
- 
 
- 
- 
- 
Constructor Detail- 
GetDataMessagepublic GetDataMessage(NetworkParameters params, java.nio.ByteBuffer payload) throws ProtocolException - Throws:
- ProtocolException
 
 - 
GetDataMessagepublic GetDataMessage(NetworkParameters params, java.nio.ByteBuffer payload, MessageSerializer serializer) throws ProtocolException Deserializes a 'getdata' message.- Parameters:
- params- NetworkParameters object.
- payload- Bitcoin protocol formatted byte array containing message content.
- serializer- the serializer to use for this message.
- Throws:
- ProtocolException
 
 - 
GetDataMessagepublic GetDataMessage(NetworkParameters params) 
 
- 
 - 
Method Detail- 
addTransactionpublic void addTransaction(Sha256Hash hash, boolean includeWitness) 
 - 
addBlockpublic void addBlock(Sha256Hash hash, boolean includeWitness) 
 - 
addFilteredBlockpublic void addFilteredBlock(Sha256Hash hash) 
 - 
getHashOfpublic Sha256Hash getHashOf(int i) 
 
- 
 
-