AbstractSignatureType (Gradle API 2.14.1)
Date: 2016-07-18

org.gradle.plugins.signing.type

## Class AbstractSignatureType

- java.lang.Object
- - groovy.lang.GroovyObjectSupport
  - - org.gradle.plugins.signing.type.AbstractSignatureType

- All Implemented Interfaces:
    GroovyObject, SignatureType
  Direct Known Subclasses:
    ArmoredSignatureType, BinarySignatureType

      public abstract class AbstractSignatureType
      extends GroovyObjectSupport
      implements SignatureType

  Convenience base class for `SignatureType` implementations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSignatureType()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `combinedExtension(File toSign)` Combines the extension of the given file with the expected signature extension.
    `File` | `fileFor(File toSign)` Calculates the file where to store the signature of the given file to be signed.
    `File` | `sign(Signatory signatory, File toSign)` Signs the given file and returns the file where the signature has been written to.
    `void` | `sign(Signatory signatory, InputStream toSign, OutputStream destination)` Signs the data from the given InputStream and stores the signature in the given OutputStream.

    - ### Methods inherited from class groovy.lang.GroovyObjectSupport

      `getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty`

    - ### 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`

- - ### Constructor Detail

    - #### AbstractSignatureType

          public AbstractSignatureType()

  - ### Method Detail

    - #### sign

          public File sign(Signatory signatory,
                  File toSign)

      Description copied from interface: `SignatureType`
      Signs the given file and returns the file where the signature has been written to.
      Specified by:
        `sign` in interface `SignatureType`
      Parameters:
        `signatory` - The signatory
        `toSign` - The file to be signed
      Returns:
        The file where the signature has been written to

    - #### sign

          public void sign(Signatory signatory,
                  InputStream toSign,
                  OutputStream destination)

      Description copied from interface: `SignatureType`
      Signs the data from the given InputStream and stores the signature in the given OutputStream.
      Specified by:
        `sign` in interface `SignatureType`
      Parameters:
        `signatory` - The signatory
        `toSign` - The source of the data to be signed
        `destination` - Where the signature will be written to

    - #### fileFor

          public File fileFor(File toSign)

      Description copied from interface: `SignatureType`
      Calculates the file where to store the signature of the given file to be signed.
      Specified by:
        `fileFor` in interface `SignatureType`
      Parameters:
        `toSign` - The file to be signed
      Returns:
        The file where to write the signature of the given file to be signed

    - #### combinedExtension

          public String combinedExtension(File toSign)

      Description copied from interface: `SignatureType`
      Combines the extension of the given file with the expected signature extension.
      Specified by:
        `combinedExtension` in interface `SignatureType`
      Parameters:
        `toSign` - The file to be signed
      Returns:
        The combined file extension (without the leading dot)
      See Also:
        `SignatureType.getExtension()`