public abstract class ListMessage extends Message
Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.
Instances of this class are not safe for use by multiple threads.
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.List<InventoryItem> | items | 
| static long | MAX_INVENTORY_ITEMS | 
cursor, length, MAX_SIZE, offset, params, payload, protocolVersion, recached, serializer, UNKNOWN_LENGTH| Constructor and Description | 
|---|
| ListMessage(NetworkParameters params) | 
| ListMessage(NetworkParameters params,
           byte[] bytes) | 
| ListMessage(NetworkParameters params,
           byte[] payload,
           MessageSerializer serializer,
           int length) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addItem(InventoryItem item) | 
| void | bitcoinSerializeToStream(java.io.OutputStream stream)Serializes this message to the provided stream. | 
| boolean | equals(java.lang.Object o) | 
| java.util.List<InventoryItem> | getItems() | 
| int | hashCode() | 
| protected void | parse() | 
| void | removeItem(int index) | 
| java.lang.String | toString() | 
adjustLength, bitcoinSerialize, bitcoinSerialize, getHash, getMessageSize, getParams, hasMoreBytes, isCached, isRecached, readByteArray, readBytes, readHash, readInt64, readStr, readUint32, readUint64, readVarInt, readVarInt, unCache, unsafeBitcoinSerializeprotected java.util.List<InventoryItem> items
public static final long MAX_INVENTORY_ITEMS
public ListMessage(NetworkParameters params, byte[] bytes) throws ProtocolException
ProtocolExceptionpublic ListMessage(NetworkParameters params, byte[] payload, MessageSerializer serializer, int length) throws ProtocolException
ProtocolExceptionpublic ListMessage(NetworkParameters params)
public java.util.List<InventoryItem> getItems()
public void addItem(InventoryItem item)
public void removeItem(int index)
protected void parse()
              throws ProtocolException
parse in class MessageProtocolExceptionpublic void bitcoinSerializeToStream(java.io.OutputStream stream)
                              throws java.io.IOException
MessagebitcoinSerializeToStream in class Messagejava.io.IOExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object