Class OperatorStreamException

  • All Implemented Interfaces:
    java.io.Serializable

    public class OperatorStreamException
    extends java.io.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:
    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 a GeneralSecurityException subclass or a lightweight org.bouncycastle.crypto.CryptoException from inside the operator.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 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.