Package com.helger.commons.io.relative
Class PathRelativeIO
- java.lang.Object
-
- com.helger.commons.io.relative.PathRelativeIO
-
- All Implemented Interfaces:
IPathRelativeIO
@Immutable public class PathRelativeIO extends Object implements IPathRelativeIO
Default implementation ofIPathRelativeIO.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description PathRelativeIO(String sBasePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetBasePath()StringgetBaseURL()IReadableResourcegetResource(String sRelativePath)Get the file system resource relative to the base path.inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.io.relative.IPathRelativeIO
getInputStream, getReader
-
-
-
-
Method Detail
-
getBasePath
@Nonnull @Nonempty public String getBasePath()
- Specified by:
getBasePathin interfaceIPathRelativeIO- Returns:
- The base path. May be a file path, a URL or whatever. Never
null.
-
getResource
@Nonnull public IReadableResource getResource(@Nonnull @Nonempty String sRelativePath)
Description copied from interface:IPathRelativeIOGet the file system resource relative to the base path. This method CAN NOT handle absolute paths!- Specified by:
getResourcein interfaceIPathRelativeIO- Parameters:
sRelativePath- the relative path- Returns:
- The "absolute"
IReadableResourceand nevernull.
-
-