Code example for StatusLine

Methods: getProtocolVersion, getStatusCode

0
    public void setLocale(Locale loc) {
        if (loc == null) {
            throw new IllegalArgumentException("Locale may not be null.");
        } 
        this.locale = loc;
        final int code = this.statusline.getStatusCode();
        this.statusline = new BasicStatusLine
            (this.statusline.getProtocolVersion(), code, getReason(code));
    } 
 
    /** 
     * Looks up a reason phrase. 
     * This method evaluates the currently set catalog and locale. 
     * It also handles a missing catalog. 
     * 
     * @param code      the status code for which to look up the reason 
     * 
     * @return  the reason phrase, or <code>null</code> if there is none 
     */ 
    protected String getReason(int code) {
        return (this.reasonCatalog == null) ?