Class DecodeException

  • All Implemented Interfaces:
    Serializable, LocalizableException

    public final class DecodeException
    extends IOException
    implements LocalizableException
    Thrown when data from an input source cannot be decoded, perhaps due to the data being malformed in some way. By default decoding exceptions are fatal, indicating that the associated input source is no longer usable.
    See Also:
    Serialized Form
    • Method Detail

      • error

        public static DecodeException error​(LocalizableMessage message)
        Creates a new non-fatal decode exception with the provided message.
        Parameters:
        message - The message that explains the problem that occurred.
        Returns:
        The new non-fatal decode exception.
      • error

        public static DecodeException error​(Throwable cause)
        Creates a new non-fatal decode exception with the provided root cause.
        Parameters:
        cause - The underlying cause of this exception.
        Returns:
        The new non-fatal decode exception.
      • error

        public static DecodeException error​(LocalizableMessage message,
                                            Throwable cause)
        Creates a new non-fatal decode exception with the provided message and root cause.
        Parameters:
        message - The message that explains the problem that occurred.
        cause - The underlying cause of this exception.
        Returns:
        The new non-fatal decode exception.
      • fatalError

        public static DecodeException fatalError​(LocalizableMessage message)
        Creates a new fatal decode exception with the provided message. The associated input source can no longer be used.
        Parameters:
        message - The message that explains the problem that occurred.
        Returns:
        The new fatal decode exception.
      • fatalError

        public static DecodeException fatalError​(Throwable cause)
        Creates a new fatal decode exception with the provided root cause. The associated input source can no longer be used.
        Parameters:
        cause - The underlying cause of this exception.
        Returns:
        The new fatal decode exception.
      • fatalError

        public static DecodeException fatalError​(LocalizableMessage message,
                                                 Throwable cause)
        Creates a new fatal decode exception with the provided message and root cause. The associated input source can no longer be used.
        Parameters:
        message - The message that explains the problem that occurred.
        cause - The underlying cause of this exception.
        Returns:
        The new fatal decode exception.
      • isFatal

        public boolean isFatal()
        Indicates whether the error was fatal and the associated input source can no longer be used.
        Returns:
        true if the error was fatal and the associated input source can no longer be used, otherwise false .