Package org.bitcoinj.core
Class ListMessage
- java.lang.Object
 - 
- org.bitcoinj.core.BaseMessage
 - 
- org.bitcoinj.core.ListMessage
 
 
 
- 
- All Implemented Interfaces:
 Message
- Direct Known Subclasses:
 GetDataMessage,InventoryMessage
public abstract class ListMessage extends BaseMessage
Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.
Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.List<InventoryItem>itemsstatic intMAX_INVENTORY_ITEMS 
- 
Constructor Summary
Constructors Modifier Constructor Description ListMessage()Deprecated.protectedListMessage(java.util.List<InventoryItem> items) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddItem(InventoryItem item)Deprecated.voidbitcoinSerializeToStream(java.io.OutputStream stream)Serializes this message to the provided stream.booleanequals(java.lang.Object o)java.util.List<InventoryItem>getItems()inthashCode()protected static java.util.List<InventoryItem>readItems(java.nio.ByteBuffer payload)voidremoveItem(int index)Deprecated.java.lang.StringtoString()- 
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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
items
protected final java.util.List<InventoryItem> items
 
- 
MAX_INVENTORY_ITEMS
public static final int MAX_INVENTORY_ITEMS
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ListMessage
@Deprecated public ListMessage()
Deprecated. 
- 
ListMessage
protected ListMessage(java.util.List<InventoryItem> items)
 
 - 
 
- 
Method Detail
- 
readItems
protected static java.util.List<InventoryItem> readItems(java.nio.ByteBuffer payload) throws java.nio.BufferUnderflowException, ProtocolException
- Throws:
 java.nio.BufferUnderflowExceptionProtocolException
 
- 
getItems
public java.util.List<InventoryItem> getItems()
 
- 
addItem
@Deprecated public void addItem(InventoryItem item)
Deprecated. 
- 
removeItem
@Deprecated public void removeItem(int index)
Deprecated. 
- 
bitcoinSerializeToStream
public void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOExceptionDescription copied from class:BaseMessageSerializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().- Specified by:
 bitcoinSerializeToStreamin classBaseMessage- Throws:
 java.io.IOException
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -