Package com.helger.io.relative
Class PathRelativeIO
java.lang.Object
com.helger.io.relative.PathRelativeIO
- All Implemented Interfaces:
IPathRelativeIO
Default implementation of
IPathRelativeIO.- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull @Nonempty String@NonNull @Nonempty String@NonNull IReadableResourcegetResource(@NonNull @Nonempty String sRelativePath) Get the file system resource relative to the base path.inthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.io.relative.IPathRelativeIO
getInputStream, getReader
-
Constructor Details
-
PathRelativeIO
Constructor.- Parameters:
sBasePath- The base path to use. May neither benullnor empty.
-
-
Method Details
-
getBasePath
- Specified by:
getBasePathin interfaceIPathRelativeIO- Returns:
- The base path. May be a file path, a URL or whatever. Never
null.
-
getBaseURL
- Returns:
- The base URL derived from the base path. Neither
nullnor empty.
-
getResource
Get 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.
-
equals
-
hashCode
public int hashCode() -
toString
-