Top Description Constructors Methods
org.eclipse.jetty.util.resource

public final Class Resources

extends Object
Class Inheritance

Collection of helpful static methods for working with Resource objects.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if resource is non-null and exists
exists
(Resource
the resource to test
resource
)

True if the resource exists.

public static boolean

Returns:

true if resource is a combination of other resources
isCombined
(Resource
the resource to test
resource
)

True if the resource has been created by combining other resources.

public static boolean

Returns:

true if resource is non-null, exists, and is a directory
isDirectory
(Resource
the resource to test
resource
)

True if resource is a valid directory.

public static boolean

Returns:

true if resource is non-null, exists, and is readable
isReadable
(Resource
the resource to test
resource
)

True if resource is readable.

public static boolean

Returns:

true if resource is non-null, exists, and is a directory
isReadableDirectory
(Resource
the resource to test
resource
)

True if resource is a valid directory that can be read from.

public static boolean

Returns:

true if resource exists, is not a directory, is
isReadableFile
(Resource
the resource to test
resource
)

True if resource exists, is not a directory, is readable.

public static boolean

Returns:

true if resource is null or doesn't exist
missing
(Resource
the resource to test
resource
)

True if the resource is missing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Resourcesback to summary
public Resources()

Method Detail

existsback to summary
public static boolean exists(Resource resource)

True if the resource exists.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is non-null and exists

See Also
Resource#exists()
isCombinedback to summary
public static boolean isCombined(Resource resource)

True if the resource has been created by combining other resources.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is a combination of other resources

isDirectoryback to summary
public static boolean isDirectory(Resource resource)

True if resource is a valid directory.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is non-null, exists, and is a directory

See Also
Resource#exists(), Resource#isDirectory()
isReadableback to summary
public static boolean isReadable(Resource resource)

True if resource is readable.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is non-null, exists, and is readable

See Also
Resource#exists(), Resource#isReadable()
isReadableDirectoryback to summary
public static boolean isReadableDirectory(Resource resource)

True if resource is a valid directory that can be read from.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is non-null, exists, and is a directory

See Also
Resource#exists(), Resource#isDirectory()
isReadableFileback to summary
public static boolean isReadableFile(Resource resource)

True if resource exists, is not a directory, is readable.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource exists, is not a directory, is

missingback to summary
public static boolean missing(Resource resource)

True if the resource is missing.

Parameters
resource:Resource

the resource to test

Returns:boolean

true if resource is null or doesn't exist

See Also
Resource#exists()