public class ScriptChunk extends Object
Constructor and Description |
---|
ScriptChunk(int opcode,
byte[] data) |
ScriptChunk(int opcode,
byte[] data,
int startLocationInProgram) |
Modifier and Type | Method and Description |
---|---|
int |
decodeOpN()
If this chunk is an OP_N opcode returns the equivalent integer value.
|
boolean |
equals(Object o) |
boolean |
equalsOpCode(int opcode) |
int |
getStartLocationInProgram() |
int |
hashCode() |
boolean |
isOpCode()
If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
|
boolean |
isPushData()
Returns true if this chunk is pushdata content, including the single-byte pushdatas.
|
boolean |
isShortestPossiblePushData()
Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the data.
|
String |
toString() |
void |
write(OutputStream stream) |
public final int opcode
@Nullable public final byte[] data
public ScriptChunk(int opcode, byte[] data)
public ScriptChunk(int opcode, byte[] data, int startLocationInProgram)
public boolean equalsOpCode(int opcode)
public boolean isOpCode()
public boolean isPushData()
public int getStartLocationInProgram()
public int decodeOpN()
public boolean isShortestPossiblePushData()
public void write(OutputStream stream) throws IOException
IOException
Copyright © 2014. All rights reserved.