Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

void com::prolixtech::jaminid::Response::setStatus ( int  statusCode  )  [inline]

sets the status of the response to a certain HTTP status code

Parameters:
statusCode the code to set the status to

Definition at line 52 of file Response.java.

Referenced by com::prolixtech::jaminid_examples::SimpleServer::demultiplex(), com::prolixtech::jaminid_examples::ajax::SimpleAjaxServer::demultiplex(), and sendFile().

                                          {
        if (Protocol.getHeaderResponseStatus(statusCode) != null) {
            statusLine = Protocol.HTTP_VERSION + " " + statusCode + " "
                    + Protocol.getHeaderResponseStatus(statusCode);
        } else {
            throw new java.lang.IllegalArgumentException("No such status code");
        }
    }


Generated by  Doxygen 1.6.0   Back to index