Package com.networknt.schema.resource
Class IriResourceLoader
java.lang.Object
com.networknt.schema.resource.IriResourceLoader
- All Implemented Interfaces:
ResourceLoader
Loads from iri.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IriResourceLoadergetResource(AbsoluteIri absoluteIri) Loads data given the retrieval IRI.protected InputStreamprotected URItoURI(AbsoluteIri absoluteIri) Converts an AbsoluteIRI to a URI.protected URLConverts a URI to a URL.
-
Constructor Details
-
IriResourceLoader
public IriResourceLoader()
-
-
Method Details
-
getInstance
-
getResource
Description copied from interface:ResourceLoaderLoads data given the retrieval IRI.- Specified by:
getResourcein interfaceResourceLoader- Parameters:
absoluteIri- the retrieval IRI- Returns:
- the input stream source
-
toURI
Converts an AbsoluteIRI to a URI.Internationalized domain names will be converted using java.net.IDN.toASCII.
- Parameters:
absoluteIri- the absolute IRI- Returns:
- the URI
-
toURL
Converts a URI to a URL.This will throw if the URI is not a valid URL. For instance if the URI is not absolute.
- Parameters:
uri- the URL- Returns:
- the URL
-
openConnectionCheckRedirects
- Throws:
IOException
-