Package org.apache.pinot.spi.utils
Class ResourceFinder
- java.lang.Object
-
- org.apache.pinot.spi.utils.ResourceFinder
-
public class ResourceFinder extends Object
Utility class containing helper method for accessing a particular resource
-
-
Method Summary
Modifier and Type Method Description static InputStreamopenResource(ClassLoader classLoader, String pathName)Access a resource on a FilePathstatic InputStreamopenResource(URI uri)Access a resource for a particular URIstatic InputStreamopenResourceWithRelativePath(ClassLoader classLoader, String pathName)Access a resource on a Relative FilePath
-
-
-
Method Detail
-
openResource
public static InputStream openResource(URI uri) throws IOException
Access a resource for a particular URI- Parameters:
uri- of the resource- Returns:
- InputStream containing file contents
- Throws:
IOException
-
openResource
public static InputStream openResource(ClassLoader classLoader, String pathName) throws IOException
Access a resource on a FilePath- Parameters:
classLoader- ClassPath for the resourcepathName- Absolute or Relative Path of the resource- Returns:
- InputStream containing file contents
- Throws:
IOException
-
openResourceWithRelativePath
public static InputStream openResourceWithRelativePath(ClassLoader classLoader, String pathName) throws IOException
Access a resource on a Relative FilePath- Parameters:
classLoader- ClassPath for the resourcepathName- Relative Path of the resource- Returns:
- InputStream containing file contents
- Throws:
IOException
-
-