com.google.bitcoin.script
Class ScriptChunk

java.lang.Object
  extended by com.google.bitcoin.script.ScriptChunk

public class ScriptChunk
extends Object

An element that is either an opcode or a raw byte array (signature, pubkey, etc).


Field Summary
 byte[] data
           
 
Constructor Summary
ScriptChunk(boolean isOpCode, byte[] data)
           
ScriptChunk(boolean isOpCode, byte[] data, int startLocationInProgram)
           
 
Method Summary
 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)
 void write(OutputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

public final byte[] data
Constructor Detail

ScriptChunk

public ScriptChunk(boolean isOpCode,
                   byte[] data)

ScriptChunk

public ScriptChunk(boolean isOpCode,
                   byte[] data,
                   int startLocationInProgram)
Method Detail

equalsOpCode

public boolean equalsOpCode(int opCode)

isOpCode

public boolean isOpCode()
If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)


getStartLocationInProgram

public int getStartLocationInProgram()

write

public void write(OutputStream stream)
           throws IOException
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014. All rights reserved.