Package org.bouncycastle.operator
Class OperatorStreamException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.bouncycastle.operator.OperatorStreamException
-
- All Implemented Interfaces:
java.io.Serializable
public class OperatorStreamException extends java.io.IOExceptionThrown from inside an operator's streaming method when an underlying cryptographic failure occurs and the surrounding signature only permits anIOException.Operators that expose stream-shaped interfaces — for example
DigestCalculator.getOutputStream(),MacCalculator.getOutputStream(),ContentSigner.getOutputStream(),OutputEncryptor.getOutputStream(OutputStream)— have theirOutputStream.write/InputStream.readmethods constrained by thethrows IOExceptiondeclared onOutputStream/InputStream. A cryptographic failure that surfaces from inside one of those calls (cipher state corruption, MAC tag mismatch, padding error, etc.) is wrapped in anOperatorStreamExceptionso it can propagate out of the stream method via theIOExceptiontype, while still carrying the original failure on its cause chain for diagnosis viaThrowable.getCause().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OperatorStreamException(java.lang.String msg, java.lang.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.
-
-
-
Constructor Detail
-
OperatorStreamException
public OperatorStreamException(java.lang.String msg, java.lang.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.- Parameters:
msg- diagnostic message describing the failure.cause- the underlying exception that triggered the failure, ornull.
-
-