Class ResourceLocator.Response

    • Field Detail

      • myConnection

        private final java.net.URLConnection myConnection
      • myString

        private transient java.lang.String myString
    • Method Detail

      • getInputStream

        public java.io.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 java.io.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)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object