public class TransactionOutPoint extends ChildMessage implements Serializable
Message.LazyParseException
bytes, checksum, cursor, length, MAX_SIZE, offset, params, parsed, parseLazy, parseRetain, protocolVersion, recached, UNKNOWN_LENGTH
Constructor and Description |
---|
TransactionOutPoint(NetworkParameters params,
byte[] payload,
int offset)
/**
Deserializes the message.
|
TransactionOutPoint(NetworkParameters params,
byte[] payload,
int offset,
Message parent,
boolean parseLazy,
boolean parseRetain)
Deserializes the message.
|
TransactionOutPoint(NetworkParameters params,
long index,
Sha256Hash hash) |
TransactionOutPoint(NetworkParameters params,
long index,
Transaction fromTx) |
Modifier and Type | Method and Description |
---|---|
protected void |
bitcoinSerializeToStream(OutputStream stream)
Serializes this message to the provided stream.
|
boolean |
equals(Object other) |
ECKey |
getConnectedKey(Wallet wallet)
Returns the ECKey identified in the connected output, for either pay-to-address scripts or pay-to-key scripts.
|
TransactionOutput |
getConnectedOutput()
An outpoint is a part of a transaction input that points to the output of another transaction.
|
Sha256Hash |
getHash()
Returns the hash of the transaction this outpoint references/spends/is connected to.
|
long |
getIndex() |
int |
getMessageSize()
This should be overridden to extract correct message size in the case of lazy parsing.
|
int |
hashCode() |
protected void |
parseLite()
Perform the most minimal parse possible to calculate the length of the message.
|
void |
setIndex(long index) |
String |
toString() |
adjustLength, adjustLength, setParent, unCache
bitcoinSerialize, bitcoinSerialize, ensureParsed, getParams, isCached, isParsed, isRecached, maybeParse, unsafeBitcoinSerialize
public TransactionOutPoint(NetworkParameters params, long index, @Nullable Transaction fromTx)
public TransactionOutPoint(NetworkParameters params, long index, Sha256Hash hash)
public TransactionOutPoint(NetworkParameters params, byte[] payload, int offset) throws ProtocolException
ProtocolException
public TransactionOutPoint(NetworkParameters params, byte[] payload, int offset, Message parent, boolean parseLazy, boolean parseRetain) throws ProtocolException
params
- NetworkParameters object.offset
- The location of the first msg byte within the array.parseLazy
- Whether to perform a full parse immediately or delay until a read is requested.parseRetain
- Whether to retain the backing byte array for quick reserialization.
If true and the backing byte array is invalidated due to modification of a field then
the cached bytes may be repopulated and retained if the message is serialized again in the future.ProtocolException
protected void parseLite() throws ProtocolException
Message
parseLite
in class Message
ProtocolException
public int getMessageSize()
Message
getMessageSize
in class Message
protected void bitcoinSerializeToStream(OutputStream stream) throws IOException
Message
IOException
@Nullable public TransactionOutput getConnectedOutput()
@Nullable public ECKey getConnectedKey(Wallet wallet) throws ScriptException
ScriptException
public Sha256Hash getHash()
public long getIndex()
public void setIndex(long index)
Copyright © 2014. All rights reserved.