You're interested in the following API calls:
public List<TransactionInput> Transaction.getInputs()
public Script TransactionInput.getScriptSig() throws ScriptException
public void Script.correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey)
Use them like so:
Transaction tx = ...
List<TransactionInput> inputs = tx.getInputs();
for(int i = 0; i < inputs.size(); i++) {
TransactionInput input = inputs.get(i);
Script scriptSig = input.getScriptSig();
Script scriptPubKey = ...
scriptSig.correctlySpends(tx, i, scriptPubKey);
}
The tricky bit is getting scriptPubKey. If you have the transactions you're spending in memory, it's as simple as input.getConnectedOutput().getScriptPubKey();
If it isn't, then you can make an educated guess by converting the address to a P2PKH scriptPubKey.
public static Script ScriptBuilder.createOutputScript(Address to)
This creates an edge case where if someone tries to spend a P2PK output, it will appear to be signed incorrectly to your program. (Both are represented by addresses.)
http://bitcoin.stackexchange.com/questions/32305 – amaclin – 2015-01-07T15:15:36.617