public static Script createP2SHOutputScript(Script redeemScript){
  byte[] hash=Utils.sha256hash160(redeemScript.getProgram());
  return ScriptBuilder.createP2SHOutputScript(hash);
}

public static Script createP2SHOutputScript ( Script redeemScript ) { byte [ ] hash = Utils . sha256hash160 ( redeemScript . getProgram ( ) ) ; return ScriptBuilder . createP2SHOutputScript ( hash ) ; }
creates a scriptpubkey for the given redeem script .
