Class Erase


  • public final class Erase
    extends java.lang.Object
    Erases IOException for the compiler but still throws that exception at runtime.
    Since:
    2.16.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.lang.Throwable>
      java.lang.RuntimeException
      rethrow​(java.lang.Throwable throwable)
      Throws the given throwable.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rethrow

        public static <T extends java.lang.Throwable> java.lang.RuntimeException rethrow​(java.lang.Throwable throwable)
                                                                                  throws T extends java.lang.Throwable
        Throws the given throwable.
        Type Parameters:
        T - The throwable cast type.
        Parameters:
        throwable - The throwable to rethrow.
        Returns:
        nothing because we throw.
        Throws:
        T - Always thrown.
        T extends java.lang.Throwable