Package sop

# Class ReadyWithResult<T>

java.lang.Object
sop.ReadyWithResult<T>

public abstract class ReadyWithResult<T> extends Object

## Constructor Summary

Constructors
Constructor
Description
`ReadyWithResult()`

## Method Summary

Modifier and Type
Method
Description
`ByteArrayAndResult<T>`
`toByteArrayAndResult()`
Return the data as a `ByteArrayAndResult`.
`abstract T`
`writeTo(OutputStream outputStream)`
Write the data e.g.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ReadyWithResult

public ReadyWithResult()

## Method Details

### writeTo

public abstract T writeTo(OutputStream outputStream) throws IOException, SOPGPException.NoSignature
Write the data e.g. decrypted plaintext to the provided output stream and return the result of the processing operation.

Parameters:
  `outputStream` - output stream
Returns:
  result, eg. signatures
Throws:
  `IOException` - in case of an IO error
  `SOPGPException.NoSignature` - if there are no valid signatures found

### toByteArrayAndResult

public ByteArrayAndResult<T> toByteArrayAndResult() throws IOException, SOPGPException.NoSignature
Return the data as a `ByteArrayAndResult`. Calling `ByteArrayAndResult.getBytes()` will give you access to the data as byte array, while `ByteArrayAndResult.getResult()` will grant access to the appended result.

Returns:
  byte array and result
Throws:
  `IOException` - in case of an IO error
  `SOPGPException.NoSignature` - if there are no valid signatures found