public class HttpResponseStatus extends java.lang.Object implements java.lang.Comparable<HttpResponseStatus>
Constructor and Description |
---|
HttpResponseStatus(int code, java.lang.String reasonPhrase)
用指定的
code 及其
reasonPhrase 创建一个新实例。
|
Modifier and Type | Method and Description |
---|---|
int |
code()
返回此 HttpResponseStatus 的代码。
|
AsciiString |
codeAsText()
返回状态码为 AsciiString 。
|
HttpStatusClass |
codeClass()
返回此 HttpResponseStatus 的类
|
int |
compareTo(HttpResponseStatus o)
HttpResponseStatus 的平等仅取决于code() 。
|
boolean |
equals(java.lang.Object o)
HttpResponseStatus 的平等仅取决于code() 。
|
int |
hashCode() |
static HttpResponseStatus |
parseLine(AsciiString line)
将指定的HTTP状态行解析为 HttpResponseStatus 。
|
static HttpResponseStatus |
parseLine(java.lang.CharSequence line)
将指定的HTTP状态行解析为 HttpResponseStatus 。
|
static HttpResponseStatus |
parseLine(java.lang.String line)
将指定的HTTP状态行解析为 HttpResponseStatus 。
|
java.lang.String |
reasonPhrase()
返回此 HttpResponseStatus 的原因词组。
|
java.lang.String |
toString() |
static HttpResponseStatus |
valueOf(int code)
返回由指定代码表示的 HttpResponseStatus 。
|
static HttpResponseStatus |
valueOf(int code, java.lang.String reasonPhrase)
返回 HttpResponseStatus 由指定的代表code 和reasonPhrase 。
|
public static final HttpResponseStatus CONTINUE
public static final HttpResponseStatus SWITCHING_PROTOCOLS
public static final HttpResponseStatus PROCESSING
public static final HttpResponseStatus OK
public static final HttpResponseStatus CREATED
public static final HttpResponseStatus ACCEPTED
public static final HttpResponseStatus NON_AUTHORITATIVE_INFORMATION
public static final HttpResponseStatus NO_CONTENT
public static final HttpResponseStatus RESET_CONTENT
public static final HttpResponseStatus PARTIAL_CONTENT
public static final HttpResponseStatus MULTI_STATUS
public static final HttpResponseStatus MULTIPLE_CHOICES
public static final HttpResponseStatus MOVED_PERMANENTLY
public static final HttpResponseStatus FOUND
public static final HttpResponseStatus SEE_OTHER
public static final HttpResponseStatus NOT_MODIFIED
public static final HttpResponseStatus USE_PROXY
public static final HttpResponseStatus TEMPORARY_REDIRECT
public static final HttpResponseStatus PERMANENT_REDIRECT
public static final HttpResponseStatus BAD_REQUEST
public static final HttpResponseStatus UNAUTHORIZED
public static final HttpResponseStatus PAYMENT_REQUIRED
public static final HttpResponseStatus FORBIDDEN
public static final HttpResponseStatus NOT_FOUND
public static final HttpResponseStatus METHOD_NOT_ALLOWED
public static final HttpResponseStatus NOT_ACCEPTABLE
public static final HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED
public static final HttpResponseStatus REQUEST_TIMEOUT
public static final HttpResponseStatus CONFLICT
public static final HttpResponseStatus GONE
public static final HttpResponseStatus LENGTH_REQUIRED
public static final HttpResponseStatus PRECONDITION_FAILED
public static final HttpResponseStatus REQUEST_ENTITY_TOO_LARGE
public static final HttpResponseStatus REQUEST_URI_TOO_LONG
public static final HttpResponseStatus UNSUPPORTED_MEDIA_TYPE
public static final HttpResponseStatus REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpResponseStatus EXPECTATION_FAILED
public static final HttpResponseStatus MISDIRECTED_REQUEST
public static final HttpResponseStatus UNPROCESSABLE_ENTITY
public static final HttpResponseStatus LOCKED
public static final HttpResponseStatus FAILED_DEPENDENCY
public static final HttpResponseStatus UNORDERED_COLLECTION
public static final HttpResponseStatus UPGRADE_REQUIRED
public static final HttpResponseStatus PRECONDITION_REQUIRED
public static final HttpResponseStatus TOO_MANY_REQUESTS
public static final HttpResponseStatus REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpResponseStatus INTERNAL_SERVER_ERROR
public static final HttpResponseStatus NOT_IMPLEMENTED
public static final HttpResponseStatus BAD_GATEWAY
public static final HttpResponseStatus SERVICE_UNAVAILABLE
public static final HttpResponseStatus GATEWAY_TIMEOUT
public static final HttpResponseStatus HTTP_VERSION_NOT_SUPPORTED
public static final HttpResponseStatus VARIANT_ALSO_NEGOTIATES
public static final HttpResponseStatus INSUFFICIENT_STORAGE
public static final HttpResponseStatus NOT_EXTENDED
public static final HttpResponseStatus NETWORK_AUTHENTICATION_REQUIRED
public HttpResponseStatus(int code, java.lang.String reasonPhrase)
code
及其
reasonPhrase
创建一个新实例。
public static HttpResponseStatus valueOf(int code)
public static HttpResponseStatus valueOf(int code, java.lang.String reasonPhrase)
HttpResponseStatus
由指定的代表code
和reasonPhrase
。
如果指定的代码是标准HTTP状态code
和reasonPhrase
,则会返回缓存的实例。
否则,将返回一个新实例。
code
- 响应码值。
reasonPhrase
- 响应码原因短语。
HttpResponseStatus
由指定表示code
和reasonPhrase
。
public static HttpResponseStatus parseLine(java.lang.CharSequence line)
java.lang.IllegalArgumentException
- 如果指定的状态行格式不正确
public static HttpResponseStatus parseLine(java.lang.String line)
java.lang.IllegalArgumentException
- 如果指定的状态行格式不正确
public static HttpResponseStatus parseLine(AsciiString line)
java.lang.IllegalArgumentException
- 如果指定的状态行格式不正确
public int code()
HttpResponseStatus
的代码。
public AsciiString codeAsText()
AsciiString
。
public java.lang.String reasonPhrase()
HttpResponseStatus
的原因词组。
public HttpStatusClass codeClass()
HttpResponseStatus
的类
public int hashCode()
hashCode
在课程
java.lang.Object
public boolean equals(java.lang.Object o)
HttpResponseStatus
的平等仅取决于code()
。
理由不被视为平等。
equals
在课程
java.lang.Object
public int compareTo(HttpResponseStatus o)
HttpResponseStatus
的平等仅取决于code()
。
理由不被视为平等。
compareTo
在界面
java.lang.Comparable<HttpResponseStatus>
public java.lang.String toString()
toString
在课程
java.lang.Object
Copyright © 2008–2018 The Netty Project. All rights reserved.