Package org.everit.json.schema.loader
Interface SchemaClient
- All Superinterfaces:
Function<String,InputStream>
- All Known Implementing Classes:
DefaultSchemaClient
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This interface is used by
SchemaLoader to fetch the contents denoted by remote JSON
pointer.
Implementations are expected to support the HTTP/1.1 protocol, the support of other protocols is optional.
-
Method Summary
Modifier and TypeMethodDescriptiondefault InputStreamstatic SchemaClientReturns a stream to be used for reading the remote content (response body) of the URL.
-
Method Details
-
classPathAwareClient
-
apply
- Specified by:
applyin interfaceFunction<String,InputStream>
-
get
Returns a stream to be used for reading the remote content (response body) of the URL. In the case of a HTTP URL, implementations are expected send HTTP GET requests and the response is expected to be represented in UTF-8 character set.- Parameters:
url- the URL of the remote resource- Returns:
- the input stream of the response
- Throws:
UncheckedIOException- if an IO error occurs.
-