Package com.helger.commons.io.relative
Interface IPathRelativeIO
- All Known Subinterfaces:
IFileRelativeIO
- All Known Implementing Classes:
FileRelativeIO,PathRelativeIO
public interface IPathRelativeIO
A read-only version of a path-relative IO component.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault InputStreamgetInputStream(String sRelativePath) Get theInputStreamrelative to the base pathdefault ReaderGet theReaderrelative to the base pathgetResource(String sRelativePath) Get the file system resource relative to the base path.
-
Method Details
-
getBasePath
- Returns:
- The base path. May be a file path, a URL or whatever. Never
null.
-
getResource
Get the file system resource relative to the base path. This method CAN NOT handle absolute paths!- Parameters:
sRelativePath- the relative path- Returns:
- The "absolute"
IReadableResourceand nevernull.
-
getInputStream
Get theInputStreamrelative to the base path- Parameters:
sRelativePath- the relative path- Returns:
nullif the path does not exist
-
getReader
Get theReaderrelative to the base path- Parameters:
sRelativePath- the relative pathaCharset- The charset to use. May not benull.- Returns:
nullif the path does not exist
-