com.google.bitcoin.core
Class ListMessage

java.lang.Object
  extended by com.google.bitcoin.core.Message
      extended by com.google.bitcoin.core.ListMessage
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GetDataMessage, InventoryMessage

public abstract class ListMessage
extends Message

Abstract superclass of classes with list based payload, i.e. InventoryMessage and GetDataMessage.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.bitcoin.core.Message
bytes, cursor, MAX_SIZE, offset, params, protocolVersion
 
Constructor Summary
ListMessage(NetworkParameters params)
           
ListMessage(NetworkParameters params, byte[] bytes)
           
 
Method Summary
 void addItem(InventoryItem item)
           
 void bitcoinSerializeToStream(OutputStream stream)
          Serializes this message to the provided stream.
 List<InventoryItem> getItems()
           
 void parse()
           
 
Methods inherited from class com.google.bitcoin.core.Message
bitcoinSerialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListMessage

public ListMessage(NetworkParameters params,
                   byte[] bytes)
            throws ProtocolException
Throws:
ProtocolException

ListMessage

public ListMessage(NetworkParameters params)
Method Detail

getItems

public List<InventoryItem> getItems()

addItem

public void addItem(InventoryItem item)

parse

public void parse()
           throws ProtocolException
Throws:
ProtocolException

bitcoinSerializeToStream

public void bitcoinSerializeToStream(OutputStream stream)
                              throws IOException
Description copied from class: Message
Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().

Throws:
IOException


Copyright © 2011. All Rights Reserved.