Class CloseForResultInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.pgpainless.decryption_verification.CloseForResultInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
DecryptionStream
public abstract class CloseForResultInputStream extends InputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected OpenPgpMetadata.Builder
resultBuilder
-
Constructor Summary
Constructors Constructor Description CloseForResultInputStream(OpenPgpMetadata.Builder resultBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
OpenPgpMetadata
getResult()
Return the result of the decryption.-
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, read, reset, skip
-
-
-
-
Field Detail
-
resultBuilder
protected final OpenPgpMetadata.Builder resultBuilder
-
-
Constructor Detail
-
CloseForResultInputStream
public CloseForResultInputStream(@Nonnull OpenPgpMetadata.Builder resultBuilder)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
getResult
public OpenPgpMetadata getResult()
Return the result of the decryption. The result contains metadata about the decryption, such as signatures, used keys and algorithms, as well as information about the decrypted file/stream. Can only be obtained once the stream got successfully closed (close()
).- Returns:
- metadata
-
-