Package org.bitcoinj.core
Class GetBlocksMessage
java.lang.Object
org.bitcoinj.core.BaseMessage
org.bitcoinj.core.GetBlocksMessage
- All Implemented Interfaces:
 Message
- Direct Known Subclasses:
 GetHeadersMessage
Represents the "getblocks" P2P network message, which requests the hashes of the parts of the block chain we're
 missing. Those blocks can then be downloaded with a GetDataMessage.
Instances of this class are not safe for use by multiple threads.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionGetBlocksMessage(long protocolVersion, BlockLocator locator, Sha256Hash stopHash)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidbitcoinSerializeToStream(OutputStream stream) Serializes this message to the provided stream.booleaninthashCode()static GetBlocksMessageread(ByteBuffer payload) Deserialize this message from a given payload.toString()Methods inherited from class org.bitcoinj.core.BaseMessage
messageSize, serializeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bitcoinj.core.Message
bitcoinSerialize, getMessageSize, unsafeBitcoinSerialize 
- 
Field Details
- 
version
protected long version - 
locator
 - 
stopHash
 
 - 
 - 
Constructor Details
- 
GetBlocksMessage
 
 - 
 - 
Method Details
- 
read
public static GetBlocksMessage read(ByteBuffer payload) throws BufferUnderflowException, ProtocolException Deserialize this message from a given payload.- Parameters:
 payload- payload to deserialize from- Returns:
 - read message
 - Throws:
 BufferUnderflowException- if the read message extends beyond the remaining bytes of the payloadProtocolException
 - 
getLocator
 - 
getStopHash
 - 
toString
 - 
bitcoinSerializeToStream
Description copied from class:BaseMessageSerializes this message to the provided stream. If you just want the raw bytes useBaseMessage.serialize().- Specified by:
 bitcoinSerializeToStreamin classBaseMessage- Throws:
 IOException
 - 
equals
 - 
hashCode
public int hashCode() 
 -