Package com.helger.commons.io.resource
Interface IResourceBase
-
- All Known Subinterfaces:
IMemoryReadableResource,IReadableResource,IReadWriteResource,IWrappedReadableResource,IWrappedWritableResource,IWritableResource
- All Known Implementing Classes:
AbstractMemoryReadableResource,AbstractWrappedReadableResource,AbstractWrappedWritableResource,ClassPathResource,FileSystemResource,GZIPReadableResource,GZIPWritableResource,ReadableResourceByteArray,ReadableResourceInputStream,ReadableResourceString,URLResource
@MustImplementEqualsAndHashcode public interface IResourceBase
Base interface for an abstract readable resource.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists()FilegetAsFile()URLgetAsURL()StringgetPath()StringgetResourceID()
-
-
-
Method Detail
-
getResourceID
@Nonnull String getResourceID()
- Returns:
- A non-
nullresource ID used e.g. for system IDs in XML resolving.
-
exists
boolean exists()
- Returns:
trueif the resource exists,falseotherwise.
-
getAsURL
@Nullable URL getAsURL()
- Returns:
- the URL representation of this resource. May be
nullif this resource cannot be represented as an URL.
-
-