Class ResourceLocator
java.lang.Object
org.ojalgo.netio.ResourceLocator
Locate/fetch resources such as csv, json or text/html.
Started out as something relatively simple built around URL (and related stuff in the java.net
package) but grew into a complete http client.
The newer ServiceClient is instead built around the HttpClient introduced with Java 11.
Think of ServiceClient as v2 of ResourceLocator, and what you should use for http/https
calls.
This class is not (yet) deprecated, but if it is further developed it will not be primarily as an
http/https client. The focus will then be on other URL based use cases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ResourceLocator.KeyedValuesDefault session parametersprivate ResourceLocator.Requestprivate final ResourceLocator.Session(package private) static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOpen connection and return an input stream reader.method(ResourceLocator.Method method) port(int port) The default (null) value is -1.private ResourceLocator.Requestrequest()private ResourceLocator.Responseresponse()Protocol The default value is "https"static ResourceLocator.Sessionsession()toString()(package private) static String(package private) static String
-
Field Details
-
DEFAULTS
Default session parameters -
UTF_8
-
myRequest
-
mySession
-
-
Constructor Details
-
ResourceLocator
public ResourceLocator() -
ResourceLocator
-
-
Method Details
-
session
-
urldecode
-
urlencode
-
form
-
fragment
-
getInputStream
-
getStreamReader
Open connection and return an input stream reader. -
host
-
method
-
path
-
port
The default (null) value is -1. -
query
-
scheme
Protocol The default value is "https" -
toString
-
request
-
response
-