@Test public void testToStringOnInvalidScriptChunk() { ScriptChunk pushWithoutData = new ScriptChunk(OP_PUSHDATA1, null); assertEquals("PUSHDATA1", pushWithoutData.toString()); }
@Override public String toString() { if (data == null) return getOpCodeName(opcode); return String.format("%s[%s]", getPushDataName(opcode), Utils.HEX.encode(data)); }
ScriptChunk { @Override public String toString() { if (data == null) return getOpCodeName(opcode); return String.format("%s[%s]", getPushDataName(opcode), Utils.HEX.encode(data)); } }
ScriptChunk { @Override public String toString() { if (data == null) return getOpCodeName(opcode); return String.format("%s[%s]", getPushDataName(opcode), Utils.HEX.encode(data)); } ScriptChunk(int opcode, @Nullable byte[] data); }
ScriptChunk { @Override public String toString() { if (data == null) return getOpCodeName(opcode); return String.format("%s[%s]", getPushDataName(opcode), Utils.HEX.encode(data)); } ScriptChunk(int opcode, @Nullable byte[] data); boolean equalsOpCode(int opcode); boolean isOpCode(); boolean isPushData(); int decodeOpN(); boolean isShortestPossiblePushData(); void write(OutputStream stream); byte[] toByteArray(); int size(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
ScriptChunk { @Override public String toString() { if (data == null) return getOpCodeName(opcode); return String.format("%s[%s]", getPushDataName(opcode), Utils.HEX.encode(data)); } ScriptChunk(int opcode, @Nullable byte[] data); boolean equalsOpCode(int opcode); boolean isOpCode(); boolean isPushData(); int decodeOpN(); boolean isShortestPossiblePushData(); void write(OutputStream stream); byte[] toByteArray(); int size(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final int opcode; @Nullable
    final byte[] data; }