Class OperatorStreamException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.bouncycastle.operator.OperatorStreamException
All Implemented Interfaces:
Serializable

public class OperatorStreamException extends IOException
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 Details

    • OperatorStreamException

      public OperatorStreamException(String msg, 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.
      Parameters:
      msg - diagnostic message describing the failure.
      cause - the underlying exception that triggered the failure, or null.