public class GetDataMessage extends ListMessage
Message.LazyParseException
items, MAX_INVENTORY_ITEMS
checksum, cursor, length, MAX_SIZE, offset, params, parsed, parseLazy, parseRetain, payload, protocolVersion, recached, UNKNOWN_LENGTH
Constructor and Description |
---|
GetDataMessage(NetworkParameters params) |
GetDataMessage(NetworkParameters params,
byte[] payloadBytes) |
GetDataMessage(NetworkParameters params,
byte[] payload,
boolean parseLazy,
boolean parseRetain,
int length)
Deserializes a 'getdata' message.
|
Modifier and Type | Method and Description |
---|---|
void |
addBlock(Sha256Hash hash) |
void |
addFilteredBlock(Sha256Hash hash) |
void |
addTransaction(Sha256Hash hash) |
Sha256Hash |
getHashOf(int i) |
addItem, bitcoinSerializeToStream, equals, getItems, hashCode, parse, parseLite, removeItem
adjustLength, bitcoinSerialize, bitcoinSerialize, ensureParsed, getHash, getMessageSize, getParams, isCached, isParsed, isRecached, maybeParse, unCache, unsafeBitcoinSerialize
public GetDataMessage(NetworkParameters params, byte[] payloadBytes) throws ProtocolException
ProtocolException
public GetDataMessage(NetworkParameters params, byte[] payload, boolean parseLazy, boolean parseRetain, int length) throws ProtocolException
params
- NetworkParameters object.payload
- Bitcoin protocol formatted byte array containing message content.parseLazy
- Whether to perform a full parse immediately or delay until a read is requested.parseRetain
- Whether to retain the backing byte array for quick reserialization.
If true and the backing byte array is invalidated due to modification of a field then
the cached bytes may be repopulated and retained if the message is serialized again in the future.length
- The length of message if known. Usually this is provided when deserializing of the wire
as the length will be provided as part of the header. If unknown then set to Message.UNKNOWN_LENGTHProtocolException
public GetDataMessage(NetworkParameters params)
public void addTransaction(Sha256Hash hash)
public void addBlock(Sha256Hash hash)
public void addFilteredBlock(Sha256Hash hash)
public Sha256Hash getHashOf(int i)
Copyright © 2014. All rights reserved.