Package com.okta.idx.sdk.api.io
Class AbstractResource
- java.lang.Object
-
- com.okta.idx.sdk.api.io.AbstractResource
-
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
ClasspathResource
,FileResource
,UrlResource
public abstract class AbstractResource extends java.lang.Object implements Resource
-
-
Constructor Summary
Constructors Constructor Description AbstractResource(java.lang.String location)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
canonicalize(java.lang.String input)
java.lang.String
getLocation()
protected abstract java.lang.String
getScheme()
protected boolean
hasResourcePrefix(java.lang.String resourcePath)
Returnstrue
if the resource path is not null and starts with one of the recognized resource prefixes (classpath:
,url:
, orfile:
,false
otherwise.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.okta.idx.sdk.api.io.Resource
getInputStream
-
-
-
-
Method Detail
-
canonicalize
protected java.lang.String canonicalize(java.lang.String input)
-
hasResourcePrefix
protected boolean hasResourcePrefix(java.lang.String resourcePath)
Returnstrue
if the resource path is not null and starts with one of the recognized resource prefixes (classpath:
,url:
, orfile:
,false
otherwise.- Parameters:
resourcePath
- the resource path to check- Returns:
true
if the resource path is not null and starts with one of the recognized resource prefixes,false
otherwise.
-
getLocation
public java.lang.String getLocation()
-
getScheme
protected abstract java.lang.String getScheme()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-