Class UncheckedIOExceptions


  • final class UncheckedIOExceptions
    extends java.lang.Object
    Helps use lambdas that throw IOException rethrow as UncheckedIOException.
    Since:
    2.12.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.UncheckedIOException create​(java.lang.Object message)
      Creates a new UncheckedIOException for the given detail message.
      static java.io.UncheckedIOException wrap​(java.io.IOException e, java.lang.Object message)
      Creates a new UncheckedIOException for the given detail message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UncheckedIOExceptions

        private UncheckedIOExceptions()
    • Method Detail

      • create

        public static java.io.UncheckedIOException create​(java.lang.Object message)
        Creates a new UncheckedIOException for the given detail message.

        This method exists because there is no String constructor in UncheckedIOException.

        Parameters:
        message - the detail message.
        Returns:
        a new UncheckedIOException.
      • wrap

        public static java.io.UncheckedIOException wrap​(java.io.IOException e,
                                                        java.lang.Object message)
        Creates a new UncheckedIOException for the given detail message.

        This method exists because there is no String constructor in UncheckedIOException.

        Parameters:
        e - cause the IOException.
        message - the detail message.
        Returns:
        a new UncheckedIOException.