Package org.bitcoinj.core
Class NotFoundMessage
- java.lang.Object
-
- org.bitcoinj.core.BaseMessage
-
- org.bitcoinj.core.ListMessage
-
- org.bitcoinj.core.InventoryMessage
-
- org.bitcoinj.core.NotFoundMessage
-
- All Implemented Interfaces:
Message
public class NotFoundMessage extends InventoryMessage
Sent by a peer when a getdata request doesn't find the requested data in the mempool. It has the same format as an inventory message and lists the hashes of the missing items.
Instances of this class are not safe for use by multiple threads.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MIN_PROTOCOL_VERSION
-
Fields inherited from class org.bitcoinj.core.InventoryMessage
MAX_INV_SIZE
-
Fields inherited from class org.bitcoinj.core.ListMessage
items, MAX_INVENTORY_ITEMS
-
-
Constructor Summary
Constructors Constructor Description NotFoundMessage()
NotFoundMessage(java.util.List<InventoryItem> items)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NotFoundMessage
read(java.nio.ByteBuffer payload)
Deserialize this message from a given payload.-
Methods inherited from class org.bitcoinj.core.InventoryMessage
addBlock, addTransaction, with
-
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 Detail
-
NotFoundMessage
public NotFoundMessage()
-
NotFoundMessage
public NotFoundMessage(java.util.List<InventoryItem> items)
-
-
Method Detail
-
read
public static NotFoundMessage read(java.nio.ByteBuffer payload) throws java.nio.BufferUnderflowException, ProtocolException
Deserialize this message from a given payload.- Parameters:
payload
- payload to deserialize from- Returns:
- read message
- Throws:
java.nio.BufferUnderflowException
- if the read message extends beyond the remaining bytes of the payloadProtocolException
-
-