Package org.eclipse.jetty.util.resource
Class Resources
java.lang.Object
org.eclipse.jetty.util.resource.Resources
Collection of helpful static methods for working with
Resource
objects.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
True if the resource exists.static boolean
isCombined
(Resource resource) True if the resource has been created bycombining
other resources.static boolean
isDirectory
(Resource resource) True if resource is a valid directory.static boolean
isReadable
(Resource resource) True if resource is readable.static boolean
isReadableDirectory
(Resource resource) True if resource is a valid directory that can be read from.static boolean
isReadableFile
(Resource resource) True if resource exists, is not a directory, is readable.static boolean
True if the resource is missing.
-
Constructor Details
-
Resources
public Resources()
-
-
Method Details
-
exists
True if the resource exists.- Parameters:
resource
- the resource to test- Returns:
- true if resource is non-null and exists
- See Also:
-
isCombined
True if the resource has been created bycombining
other resources.- Parameters:
resource
- the resource to test- Returns:
- true if resource is a combination of other resources
-
missing
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
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
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
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
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
-