Class URLResourceProvider
- java.lang.Object
-
- com.helger.commons.io.resourceprovider.URLResourceProvider
-
- All Implemented Interfaces:
IReadableResourceProvider
@Immutable public final class URLResourceProvider extends Object implements IReadableResourceProvider
The URL resource provider.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description URLResourceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IReadableResourcegetReadableResource(String sURL)Get the resource specified by the given name for reading.inthashCode()booleansupportsReading(String sName)Check if this resource provider can handle the resource with the passed name.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.io.resourceprovider.IReadableResourceProvider
getInputStream
-
-
-
-
Method Detail
-
supportsReading
public boolean supportsReading(@Nullable String sName)
Description copied from interface:IReadableResourceProviderCheck if this resource provider can handle the resource with the passed name. If there is no real check on whether your resource provider can handle it, simply returntrue.- Specified by:
supportsReadingin interfaceIReadableResourceProvider- Parameters:
sName- The name to check. May benull.- Returns:
trueif the name is notnulland can be handled by this provider,falseotherwise.
-
getReadableResource
public IReadableResource getReadableResource(@Nonnull String sURL)
Description copied from interface:IReadableResourceProviderGet the resource specified by the given name for reading.- Specified by:
getReadableResourcein interfaceIReadableResourceProvider- Parameters:
sURL- The name of the resource to resolve.- Returns:
- The readable resource. Never
null.
-
-