Package org.ojalgo.netio
Class ResourceLocator.Response
java.lang.Object
org.ojalgo.netio.ResourceLocator.Response
- All Implemented Interfaces:
BasicLogger.Printable
- Enclosing class:
ResourceLocator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final URLConnection
private final ResourceLocator.Session
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOpen a connection and get the input stream.Will recreate the request that resulted in the final response.int
Open connection and return an input stream reader.boolean
void
print
(BasicLogger receiver) toString()
-
Field Details
-
myConnection
-
mySession
-
myString
-
-
Constructor Details
-
Response
Response(ResourceLocator.Request request)
-
-
Method Details
-
getInputStream
Open a connection and get the input stream. -
getRequest
Will recreate the request that resulted in the final response. If there has been one or more redirects, then this is NOT the same as the original request. -
getStatusCode
public int getStatusCode()- Returns:
- The http response status code, or -1 if this is not http/hhtps or if the code cannot be discerned from the response
-
getStreamReader
Open connection and return an input stream reader. This method can only be called once on each instance, and thetoString()
andprint(Printer)
methods delegate to this method. (Those methods can be called multiple timea.) -
isResponseOK
public boolean isResponseOK()- Returns:
- true if the status (response) code is in [200,300)
-
print
- Specified by:
print
in interfaceBasicLogger.Printable
-
toString
-