Package sop.operation

# Interface DetachedSign

All Superinterfaces:
  `AbstractSign<DetachedSign>`

public interface DetachedSign extends AbstractSign<DetachedSign>

## Method Summary

Modifier and Type
Method
Description
`default ReadyWithResult<SigningResult>`
`data(byte[] data)`
Signs data.
`ReadyWithResult<SigningResult>`
`data(InputStream data)`
Signs data.
`DetachedSign`
`mode(SignAs mode)`
Sets the signature mode.

### Methods inherited from interface sop.operation.AbstractSign

`key, key, noArmor, withKeyPassword, withKeyPassword`

## Method Details

### mode

DetachedSign mode(SignAs mode) throws SOPGPException.UnsupportedOption
Sets the signature mode. Note: This method has to be called before `AbstractSign.key(InputStream)` is called.

Parameters:
  `mode` - signature mode
Returns:
  builder instance
Throws:
  `SOPGPException.UnsupportedOption` - if this option is not supported

### data

ReadyWithResult<SigningResult> data(InputStream data) throws IOException, SOPGPException.KeyIsProtected, SOPGPException.ExpectedText
Signs data.

Parameters:
  `data` - input stream containing data
Returns:
  ready
Throws:
  `IOException` - in case of an IO error
  `SOPGPException.KeyIsProtected` - if at least one signing key cannot be unlocked
  `SOPGPException.ExpectedText` - if text data was expected, but binary data was encountered

### data

default ReadyWithResult<SigningResult> data(byte[] data) throws IOException, SOPGPException.KeyIsProtected, SOPGPException.ExpectedText
Signs data.

Parameters:
  `data` - byte array containing data
Returns:
  ready
Throws:
  `IOException` - in case of an IO error
  `SOPGPException.KeyIsProtected` - if at least one signing key cannot be unlocked
  `SOPGPException.ExpectedText` - if text data was expected, but binary data was encountered