org.basex.query.util.http
Class HTTPResponse

java.lang.Object
  extended by org.basex.query.util.http.HTTPResponse

public final class HTTPResponse
extends java.lang.Object

HTTP response handler. Reads HTTP response and constructs the <http:response/> element.

Author:
BaseX Team 2005-12, BSD License, Rositsa Shadura

Constructor Summary
HTTPResponse(InputInfo ii, Prop pr)
          Constructor.
 
Method Summary
 ValueIter getResponse(java.net.HttpURLConnection conn, byte[] status, java.lang.String utype)
          Constructs http:response element and reads HTTP response content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPResponse

public HTTPResponse(InputInfo ii,
                    Prop pr)
Constructor.

Parameters:
ii - input info
pr - database properties
Method Detail

getResponse

public ValueIter getResponse(java.net.HttpURLConnection conn,
                             byte[] status,
                             java.lang.String utype)
                      throws java.io.IOException,
                             QueryException
Constructs http:response element and reads HTTP response content.

Parameters:
conn - HTTP connection
status - indicates if content is required
utype - content type provided by the user to interpret the response content
Returns:
result sequence of and content items
Throws:
java.io.IOException - I/O Exception
QueryException - query exception