类 JarSigner
java.lang.Object
io.github.amsonix.molt.internal.reschiper.android.JarSigner
This class provides functionality for signing JAR files in an Android context.
-
嵌套类概要
嵌套类修饰符和类型类说明static final recordRepresents the signature information for signing JAR files. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidcheckFlagPresent(Object object, com.android.tools.build.bundletool.flags.Flag<String> flag) Checks if the specified flag is present (not null) and throws an exception if it's not.static voidcheckStringIsEmpty(String value, String name) Checks if the specified string value is empty (null or consists only of whitespace) and throws an exception if it is.voidsign(File toBeSigned, JarSigner.Signature signature) Signs the specified file using the provided signature information.
-
构造器详细资料
-
JarSigner
public JarSigner()
-
-
方法详细资料
-
sign
public void sign(File toBeSigned, JarSigner.Signature signature) throws IOException, InterruptedException Signs the specified file using the provided signature information.- 参数:
toBeSigned- The file to be signed.signature- The signature information.- 抛出:
IOException- If an I/O error occurs while signing the file.InterruptedException- If the signing process is interrupted.
-
checkFlagPresent
public static void checkFlagPresent(Object object, com.android.tools.build.bundletool.flags.Flag<String> flag) Checks if the specified flag is present (not null) and throws an exception if it's not.- 参数:
object- The object to check for presence.flag- The flag being checked.- 抛出:
com.android.tools.build.bundletool.model.exceptions.CommandExecutionException- If the flag is not present.
-
checkStringIsEmpty
Checks if the specified string value is empty (null or consists only of whitespace) and throws an exception if it is.- 参数:
value- The string value to check.name- The name of the property being checked.- 抛出:
IllegalArgumentException- If the string value is empty.
-