Class OperatorStreamException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.bouncycastle.operator.OperatorStreamException
- All Implemented Interfaces:
Serializable
Thrown from inside an operator's streaming method when an underlying cryptographic
failure occurs and the surrounding signature only permits an
IOException.
Operators that expose stream-shaped interfaces — for example
DigestCalculator.getOutputStream(),
MacCalculator.getOutputStream(),
ContentSigner.getOutputStream(),
OutputEncryptor.getOutputStream(OutputStream) — have their
OutputStream.write / InputStream.read methods constrained by the
throws IOException declared on OutputStream /
InputStream. A cryptographic failure that surfaces from inside one of
those calls (cipher state corruption, MAC tag mismatch, padding error, etc.) is
wrapped in an OperatorStreamException so it can propagate out of the stream
method via the IOException type, while still carrying the original failure on
its cause chain for diagnosis via Throwable.getCause().
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOperatorStreamException(String msg, Throwable cause) Construct an exception with the supplied diagnostic message and the underlying cause — typically aGeneralSecurityExceptionsubclass or a lightweightorg.bouncycastle.crypto.CryptoExceptionfrom inside the operator. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OperatorStreamException
Construct an exception with the supplied diagnostic message and the underlying cause — typically aGeneralSecurityExceptionsubclass or a lightweightorg.bouncycastle.crypto.CryptoExceptionfrom inside the operator.- Parameters:
msg- diagnostic message describing the failure.cause- the underlying exception that triggered the failure, ornull.
-