Package org.gradle.plugins.signing.type
Class AbstractSignatureType
- java.lang.Object
-
- org.gradle.plugins.signing.type.AbstractSignatureType
-
- All Implemented Interfaces:
SignatureType
- Direct Known Subclasses:
ArmoredSignatureType,BinarySignatureType
public abstract class AbstractSignatureType extends java.lang.Object implements SignatureType
Convenience base class forSignatureTypeimplementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractSignatureType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcombinedExtension(java.io.File toSign)Combines the extension of the given file with the expected signature extension.java.io.FilefileFor(java.io.File toSign)Calculates the file where to store the signature of the given file to be signed.java.io.Filesign(Signatory signatory, java.io.File toSign)Signs the given file and returns the file where the signature has been written to.voidsign(Signatory signatory, java.io.InputStream toSign, java.io.OutputStream destination)Signs the data from the given InputStream and stores the signature in the given OutputStream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.plugins.signing.type.SignatureType
getExtension
-
-
-
-
Method Detail
-
sign
public java.io.File sign(Signatory signatory, java.io.File toSign)
Description copied from interface:SignatureTypeSigns the given file and returns the file where the signature has been written to.- Specified by:
signin interfaceSignatureType- Parameters:
signatory- The signatorytoSign- The file to be signed- Returns:
- The file where the signature has been written to
-
sign
public void sign(Signatory signatory, java.io.InputStream toSign, java.io.OutputStream destination)
Description copied from interface:SignatureTypeSigns the data from the given InputStream and stores the signature in the given OutputStream.- Specified by:
signin interfaceSignatureType- Parameters:
signatory- The signatorytoSign- The source of the data to be signeddestination- Where the signature will be written to
-
fileFor
public java.io.File fileFor(java.io.File toSign)
Description copied from interface:SignatureTypeCalculates the file where to store the signature of the given file to be signed.- Specified by:
fileForin interfaceSignatureType- Parameters:
toSign- The file to be signed- Returns:
- The file where to write the signature of the given file to be signed
-
combinedExtension
public java.lang.String combinedExtension(java.io.File toSign)
Description copied from interface:SignatureTypeCombines the extension of the given file with the expected signature extension.- Specified by:
combinedExtensionin interfaceSignatureType- Parameters:
toSign- The file to be signed- Returns:
- The combined file extension (without the leading dot)
- See Also:
SignatureType.getExtension()
-
-