public class OperatorStreamException
extends java.io.IOException
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().
| Constructor and Description |
|---|
OperatorStreamException(java.lang.String msg,
java.lang.Throwable cause)
Construct an exception with the supplied diagnostic message and the underlying cause
— typically a
GeneralSecurityException subclass or a
lightweight org.bouncycastle.crypto.CryptoException from inside the operator. |
public OperatorStreamException(java.lang.String msg,
java.lang.Throwable cause)
GeneralSecurityException subclass or a
lightweight org.bouncycastle.crypto.CryptoException from inside the operator.msg - diagnostic message describing the failure.cause - the underlying exception that triggered the failure, or null.