Package org.bitcoinj.core
Class AddressMessage
- java.lang.Object
-
- org.bitcoinj.core.Message
-
- org.bitcoinj.core.AddressMessage
-
- Direct Known Subclasses:
AddressV1Message
,AddressV2Message
public abstract class AddressMessage extends Message
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<PeerAddress>
addresses
protected static long
MAX_ADDRESSES
-
Fields inherited from class org.bitcoinj.core.Message
MAX_SIZE, params, payload, serializer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addAddress(PeerAddress address)
protected void
bitcoinSerializeToStream(java.io.OutputStream stream)
Serializes this message to the provided stream.java.util.List<PeerAddress>
getAddresses()
void
removeAddress(int index)
-
Methods inherited from class org.bitcoinj.core.Message
bitcoinSerialize, getHash, getMessageSize, getParams, parse, readByte, readByteArray, readBytes, readHash, readInt32, readInt64, readStr, readUint32, readUint64, readVarInt, skipBytes, unCache, unsafeBitcoinSerialize
-
-
-
-
Field Detail
-
MAX_ADDRESSES
protected static final long MAX_ADDRESSES
- See Also:
- Constant Field Values
-
addresses
protected java.util.List<PeerAddress> addresses
-
-
Method Detail
-
bitcoinSerializeToStream
protected void bitcoinSerializeToStream(java.io.OutputStream stream) throws java.io.IOException
Description copied from class:Message
Serializes this message to the provided stream. If you just want the raw bytes use bitcoinSerialize().- Overrides:
bitcoinSerializeToStream
in classMessage
- Throws:
java.io.IOException
-
addAddress
public abstract void addAddress(PeerAddress address)
-
removeAddress
public void removeAddress(int index)
-
getAddresses
public java.util.List<PeerAddress> getAddresses()
- Returns:
- An unmodifiableList view of the backing List of addresses. Addresses contained within the list may be safely modified.
-
-