Class ResourceLocator.Response

java.lang.Object
org.ojalgo.netio.ResourceLocator.Response
All Implemented Interfaces:
BasicLogger.Printable
Enclosing class:
ResourceLocator

public static final class ResourceLocator.Response extends Object implements BasicLogger.Printable
  • Field Details

  • Constructor Details

  • Method Details

    • getInputStream

      public InputStream getInputStream()
      Open a connection and get the input stream.
    • getRequest

      public ResourceLocator.Request 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

      public Reader getStreamReader()
      Open connection and return an input stream reader. This method can only be called once on each instance, and the toString() and print(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

      public void print(BasicLogger receiver)
      Specified by:
      print in interface BasicLogger.Printable
    • toString

      public String toString()
      Overrides:
      toString in class Object