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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ByteArrayAndResult<T>toByteArrayAndResult()Return the data as aByteArrayAndResult.abstract TwriteTo(OutputStream outputStream)Write the data e.g. decrypted plaintext to the provided output stream and return the result of the processing operation.
-
-
-
Constructor Detail
-
ReadyWithResult
public ReadyWithResult()
-
-
Method Detail
-
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 errorSOPGPException.NoSignature- if there are no valid signatures found
-
toByteArrayAndResult
public ByteArrayAndResult<T> toByteArrayAndResult() throws IOException, SOPGPException.NoSignature
Return the data as aByteArrayAndResult. CallingByteArrayAndResult.getBytes()will give you access to the data as byte array, whileByteArrayAndResult.getResult()will grant access to the appended result.- Returns:
- byte array and result
- Throws:
IOException- in case of an IO errorSOPGPException.NoSignature- if there are no valid signatures found
-
-