Package org.pgpainless.decryption_verification

# Class DecryptionStream

java.lang.Object
java.io.InputStream
org.pgpainless.decryption_verification.DecryptionStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Direct Known Subclasses:
  `OpenPgpMessageInputStream`

public abstract class DecryptionStream extends InputStream
Abstract definition of an `InputStream` which can be used to decrypt / verify OpenPGP messages.

## Constructor Summary

Constructors
Constructor
Description
`DecryptionStream()`

## Method Summary

Modifier and Type
Method
Description
`abstract MessageMetadata`
`getMetadata()`
Return `metadata` about the decrypted / verified message.
`OpenPgpMetadata`
`getResult()`
Deprecated.
use `getMetadata()` instead.

### Methods inherited from class java.io.InputStream

`available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

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

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

## Constructor Details

### DecryptionStream

public DecryptionStream()

## Method Details

### getMetadata

public abstract MessageMetadata getMetadata()
Return `metadata` about the decrypted / verified message. The `DecryptionStream` MUST be closed via `InputStream.close()` before the metadata object can be accessed.

Returns:
  message metadata

### getResult

@Deprecated public OpenPgpMetadata getResult()
Deprecated.
use `getMetadata()` instead.
Return a `OpenPgpMetadata` object containing information about the decrypted / verified message. The `DecryptionStream` MUST be closed via `InputStream.close()` before the metadata object can be accessed.

Returns:
  message metadata