Package com.networknt.schema.resource
Class UriSchemaLoader
java.lang.Object
com.networknt.schema.resource.UriSchemaLoader
- All Implemented Interfaces:
SchemaLoader
Loads from uri.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSchema
(AbsoluteIri absoluteIri) Loads a schema given the retrieval IRI.protected InputStream
protected URI
toURI
(AbsoluteIri absoluteIri) Converts an AbsoluteIRI to a URI.protected URL
Converts a URI to a URL.
-
Constructor Details
-
UriSchemaLoader
public UriSchemaLoader()
-
-
Method Details
-
getSchema
Description copied from interface:SchemaLoader
Loads a schema given the retrieval IRI.- Specified by:
getSchema
in interfaceSchemaLoader
- 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
-