Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.changedetection.digest
Class MetaContentDigesterUtilStrategy

    java.lang.Object
      org.gradle.api.changedetection.digest.MetaDigesterUtilStrategy
          org.gradle.api.changedetection.digest.MetaContentDigesterUtilStrategy

    class MetaContentDigesterUtilStrategy
    extends MetaDigesterUtilStrategy

The DigesterUtilStrategyNames.META_CONTENT DigesterUtilStrategy implementation. The DigesterUtilStrategyNames.META_CONTENT extends the DigesterUtilStrategyNames.META DigesterUtilStrategy implementation and redefines the digestFile method to include the file content.

author:
  Tom Eyckmans

Constructor Summary
`MetaContentDigesterUtilStrategy()` Creates an instance with the default fileContentBufferSize.
`MetaContentDigesterUtilStrategy(int fileContentBufferSize)` Creates an instance with a custom fileContentBufferSize.

Method Summary
`void` | `digestFile(MessageDigest digester, File file)` Calls { this method also include the byte content of the file in the digest calculation.
`void` | `setFileContentBufferSize(int fileContentBufferSize)` Update the fileContentBufferSize.

Methods inherited from class MetaDigesterUtilStrategy
digestDirectory, digestFile

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Constructor Detail

### MetaContentDigesterUtilStrategy

    public MetaContentDigesterUtilStrategy()

  Creates an instance with the default fileContentBufferSize.

### MetaContentDigesterUtilStrategy

    public MetaContentDigesterUtilStrategy(int fileContentBufferSize)

  Creates an instance with a custom fileContentBufferSize.
  param:
    fileContentBufferSize The custom fileContentBufferSize.
  exception:
    IllegalArgumentException When the fileContentBuffer size provided <= 0.

Method Detail

### digestFile

    public void digestFile(MessageDigest digester, File file)

  Calls {
  see:
    MetaDigesterUtilStrategy.digestFile} and in addition to the DigesterUtilStrategyNames.META this method also include the byte content of the file in the digest calculation. This method uses a byte array to buffer the file content. The size of this buffer can be controlled by the fileContentBufferSize attribute.
  param:
    digester The digester to update.
  param:
    file The file that needs it's digest calculated.

### setFileContentBufferSize

    public void setFileContentBufferSize(int fileContentBufferSize)

  Update the fileContentBufferSize.
  param:
    fileContentBufferSize The new fileContentBufferSize to use.
  exception:
    IllegalArgumentException When the fileContentBuffer size provided <= 0.

Groovy Documentation