Class CloseForResultInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.pgpainless.decryption_verification.CloseForResultInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
DecryptionStream
public abstract class CloseForResultInputStream extends java.io.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.
-
-
-
Field Detail
-
resultBuilder
protected final OpenPgpMetadata.Builder resultBuilder
-
-
Constructor Detail
-
CloseForResultInputStream
public CloseForResultInputStream(@Nonnull OpenPgpMetadata.Builder resultBuilder)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.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
-
-