1069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project/*
2069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/EnglishReasonPhraseCatalog.java $
3069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * $Revision: 505744 $
4069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * $Date: 2007-02-10 10:58:45 -0800 (Sat, 10 Feb 2007) $
5069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
6069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * ====================================================================
7069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * Licensed to the Apache Software Foundation (ASF) under one
8069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * or more contributor license agreements.  See the NOTICE file
9069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * distributed with this work for additional information
10069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * regarding copyright ownership.  The ASF licenses this file
11069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * to you under the Apache License, Version 2.0 (the
12069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * "License"); you may not use this file except in compliance
13069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * with the License.  You may obtain a copy of the License at
14069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
15069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *   http://www.apache.org/licenses/LICENSE-2.0
16069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
17069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * Unless required by applicable law or agreed to in writing,
18069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * software distributed under the License is distributed on an
19069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * KIND, either express or implied.  See the License for the
21069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * specific language governing permissions and limitations
22069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * under the License.
23069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * ====================================================================
24069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
25069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * This software consists of voluntary contributions made by many
26069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * individuals on behalf of the Apache Software Foundation.  For more
27069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * information on the Apache Software Foundation, please see
28069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * <http://www.apache.org/>.
29069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
30069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project */
31069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
32069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Projectpackage org.apache.http.impl;
33069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
34069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Projectimport java.util.Locale;
35069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
36069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Projectimport org.apache.http.HttpStatus;
37069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Projectimport org.apache.http.ReasonPhraseCatalog;
38069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
39069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
40069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project/**
41069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * English reason phrases for HTTP status codes.
42069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and
43069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * RFC2518 (WebDAV) are supported.
44069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
45069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * @author Unascribed
46069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
47069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
48069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project *
49069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project * @version $Revision: 505744 $
50069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project */
51069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Projectpublic class EnglishReasonPhraseCatalog
52069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    implements ReasonPhraseCatalog {
53069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
54069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    // static array with english reason phrases defined below
55069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
56069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /**
57069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * The default instance of this catalog.
58069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * This catalog is thread safe, so there typically
59069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * is no need to create other instances.
60069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     */
61069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    public final static EnglishReasonPhraseCatalog INSTANCE =
62069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new EnglishReasonPhraseCatalog();
63069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
64069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
65069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /**
66069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * Restricted default constructor, for derived classes.
67069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * If you need an instance of this class, use {@link #INSTANCE INSTANCE}.
68069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     */
69069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    protected EnglishReasonPhraseCatalog() {
70069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        // no body
71069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    }
72069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
73069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
74069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /**
75069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * Obtains the reason phrase for a status code.
76069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     *
77069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * @param status    the status code, in the range 100-599
78069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * @param loc       ignored
79069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     *
80069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * @return  the reason phrase, or <code>null</code>
81069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     */
82069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    public String getReason(int status, Locale loc) {
83069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        if ((status < 100) || (status >= 600)) {
84069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project            throw new IllegalArgumentException
85069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                ("Unknown category for status code " + status + ".");
86069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        }
87069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
88069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        final int category = status / 100;
89069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        final int subcode  = status - 100*category;
90069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
91069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        String reason = null;
92069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        if (REASON_PHRASES[category].length > subcode)
93069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project            reason = REASON_PHRASES[category][subcode];
94069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
95069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        return reason;
96069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    }
97069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
98069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
99069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /** Reason phrases lookup table. */
100069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    private static final String[][] REASON_PHRASES = new String[][]{
101069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        null,
102069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new String[3],  // 1xx
103069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new String[8],  // 2xx
104069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new String[8],  // 3xx
105069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new String[25], // 4xx
106069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        new String[8]   // 5xx
107069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    };
108069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
109069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
110069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
111069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /**
112069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * Stores the given reason phrase, by status code.
113069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * Helper method to initialize the static lookup table.
114069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     *
115069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * @param status    the status code for which to define the phrase
116069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     * @param reason    the reason phrase for this status code
117069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project     */
118069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    private static void setReason(int status, String reason) {
119069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        final int category = status / 100;
120069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        final int subcode  = status - 100*category;
121069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        REASON_PHRASES[category][subcode] = reason;
122069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    }
123069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
124069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
125069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    // ----------------------------------------------------- Static Initializer
126069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
127069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    /** Set up status code to "reason phrase" map. */
128069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    static {
129069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        // HTTP 1.0 Server status codes -- see RFC 1945
130069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_OK,
131069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "OK");
132069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_CREATED,
133069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Created");
134069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_ACCEPTED,
135069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Accepted");
136069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NO_CONTENT,
137069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "No Content");
138069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_MOVED_PERMANENTLY,
139069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Moved Permanently");
140069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_MOVED_TEMPORARILY,
141069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Moved Temporarily");
142069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NOT_MODIFIED,
143069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Not Modified");
144069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_BAD_REQUEST,
145069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Bad Request");
146069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_UNAUTHORIZED,
147069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Unauthorized");
148069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_FORBIDDEN,
149069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Forbidden");
150069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NOT_FOUND,
151069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Not Found");
152069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_INTERNAL_SERVER_ERROR,
153069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Internal Server Error");
154069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NOT_IMPLEMENTED,
155069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Not Implemented");
156069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_BAD_GATEWAY,
157069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Bad Gateway");
158069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_SERVICE_UNAVAILABLE,
159069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Service Unavailable");
160069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
161069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        // HTTP 1.1 Server status codes -- see RFC 2048
162069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_CONTINUE,
163069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Continue");
164069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_TEMPORARY_REDIRECT,
165069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Temporary Redirect");
166069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_METHOD_NOT_ALLOWED,
167069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Method Not Allowed");
168069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_CONFLICT,
169069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Conflict");
170069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_PRECONDITION_FAILED,
171069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Precondition Failed");
172069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_REQUEST_TOO_LONG,
173069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Request Too Long");
174069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_REQUEST_URI_TOO_LONG,
175069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Request-URI Too Long");
176069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE,
177069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Unsupported Media Type");
178069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_MULTIPLE_CHOICES,
179069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Multiple Choices");
180069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_SEE_OTHER,
181069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "See Other");
182069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_USE_PROXY,
183069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Use Proxy");
184069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_PAYMENT_REQUIRED,
185069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Payment Required");
186069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NOT_ACCEPTABLE,
187069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Not Acceptable");
188069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED,
189069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Proxy Authentication Required");
190069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_REQUEST_TIMEOUT,
191069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Request Timeout");
192069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
193069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_SWITCHING_PROTOCOLS,
194069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Switching Protocols");
195069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION,
196069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Non Authoritative Information");
197069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_RESET_CONTENT,
198069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Reset Content");
199069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_PARTIAL_CONTENT,
200069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Partial Content");
201069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_GATEWAY_TIMEOUT,
202069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Gateway Timeout");
203069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED,
204069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Http Version Not Supported");
205069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_GONE,
206069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Gone");
207069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_LENGTH_REQUIRED,
208069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Length Required");
209069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE,
210069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Requested Range Not Satisfiable");
211069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_EXPECTATION_FAILED,
212069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Expectation Failed");
213069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
214069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        // WebDAV Server-specific status codes
215069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_PROCESSING,
216069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Processing");
217069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_MULTI_STATUS,
218069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Multi-Status");
219069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_UNPROCESSABLE_ENTITY,
220069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Unprocessable Entity");
221069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_INSUFFICIENT_SPACE_ON_RESOURCE,
222069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Insufficient Space On Resource");
223069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_METHOD_FAILURE,
224069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Method Failure");
225069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_LOCKED,
226069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Locked");
227069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_INSUFFICIENT_STORAGE,
228069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Insufficient Storage");
229069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project        setReason(HttpStatus.SC_FAILED_DEPENDENCY,
230069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project                  "Failed Dependency");
231069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project    }
232069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
233069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project
234069490a5ca2fd1988d29daf45d892f47ad665115The Android Open Source Project}
235