Class OpenPgpInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.pgpainless.decryption_verification.OpenPgpInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
InputStream used to determine the nature of potential OpenPGP data.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Return true, if the data is possibly binary OpenPGP.boolean
Returns true, if the underlying data is very likely (more than 99,9%) an OpenPGP message.boolean
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, read, read, reset, skip
Methods inherited from class java.io.FilterInputStream
read
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
MAX_BUFFER_SIZE
public static final int MAX_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
OpenPgpInputStream
- Throws:
IOException
-
OpenPgpInputStream
- Throws:
IOException
-
-
Method Details
-
isAsciiArmored
public boolean isAsciiArmored() -
isBinaryOpenPgp
public boolean isBinaryOpenPgp()Return true, if the data is possibly binary OpenPGP. The criterion for this are less strict than forisLikelyOpenPgpMessage()
, as it also accepts other OpenPGP packets at the beginning of the data stream. Use with caution.- Returns:
- true if data appears to be binary OpenPGP data
-
isLikelyOpenPgpMessage
public boolean isLikelyOpenPgpMessage()Returns true, if the underlying data is very likely (more than 99,9%) an OpenPGP message. OpenPGP Message means here that it starts with either anPGPEncryptedData
,PGPCompressedData
,PGPOnePassSignature
orPGPLiteralData
packet. The plausability of these data packets is checked as far as possible.- Returns:
- true if likely OpenPGP message
-
isNonOpenPgp
public boolean isNonOpenPgp()
-