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.Stringcanonicalize(java.lang.String input)java.lang.StringgetLocation()protected abstract java.lang.StringgetScheme()protected booleanhasResourcePrefix(java.lang.String resourcePath)Returnstrueif the resource path is not null and starts with one of the recognized resource prefixes (classpath:,url:, orfile:,falseotherwise.java.lang.StringtoString()-
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)
Returnstrueif the resource path is not null and starts with one of the recognized resource prefixes (classpath:,url:, orfile:,falseotherwise.- Parameters:
resourcePath- the resource path to check- Returns:
trueif the resource path is not null and starts with one of the recognized resource prefixes,falseotherwise.
-
getLocation
public java.lang.String getLocation()
-
getScheme
protected abstract java.lang.String getScheme()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-