Bouncy Castle Cryptography Library 1.85

org.bouncycastle.operator
Class OperatorStreamException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byorg.bouncycastle.operator.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 , , , — have their / methods constrained by the 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 so it can propagate out of the stream method via the type, while still carrying the original failure on its cause chain for diagnosis via Throwable.getCause().

See Also:
Serialized Form

Constructor Summary
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 from inside the operator.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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 from inside the operator.

Parameters:
msg - diagnostic message describing the failure.
cause - the underlying exception that triggered the failure, or .

Bouncy Castle Cryptography Library 1.85