Class ResourceUtil


  • public final class ResourceUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NonNull java.io.InputStream getResourceAsStream​(@NonNull java.lang.String relativeOrAbsoluteOrClasspath)
      Create new InputStream of expected resource.
      • Methods inherited from class java.lang.Object

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

      • getResourceAsStream

        @NonNull
        public static @NonNull java.io.InputStream getResourceAsStream​(@NonNull
                                                                       @NonNull java.lang.String relativeOrAbsoluteOrClasspath)
        Create new InputStream of expected resource. Dont forget to close this stream !!! Resource from Relative path from user/current/active directory or Absolute path or File in classpath or File from resource dir. Support Jar file and deps projects.
        Parameters:
        relativeOrAbsoluteOrClasspath - Relative path from user/current/active directory. Absolute path. File in classpath. File from resource dir.