Class Resources

java.lang.Object
org.eclipse.jetty.util.resource.Resources

public final class Resources extends Object
Collection of helpful static methods for working with Resource objects.
  • Constructor Details

    • Resources

      public Resources()
  • Method Details

    • exists

      public static boolean exists(Resource resource)
      True if the resource exists.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is non-null and exists
      See Also:
    • isCombined

      public static boolean isCombined(Resource resource)
      True if the resource has been created by combining other resources.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is a combination of other resources
    • missing

      public static boolean missing(Resource resource)
      True if the resource is missing.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is null or doesn't exist
      See Also:
    • isDirectory

      public static boolean isDirectory(Resource resource)
      True if resource is a valid directory.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is non-null, exists, and is a directory
      See Also:
    • isReadable

      public static boolean isReadable(Resource resource)
      True if resource is readable.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is non-null, exists, and is readable
      See Also:
    • isReadableDirectory

      public static boolean isReadableDirectory(Resource resource)
      True if resource is a valid directory that can be read from.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource is non-null, exists, and is a directory
      See Also:
    • isReadableFile

      public static boolean isReadableFile(Resource resource)
      True if resource exists, is not a directory, is readable.
      Parameters:
      resource - the resource to test
      Returns:
      true if resource exists, is not a directory, is