public final class Statuses extends Object
response status type
instances.Modifier and Type | Method and Description |
---|---|
static Response.StatusType |
from(int code)
Create a new status type instance.
|
static Response.StatusType |
from(int code,
String reason)
Create a new status type instance with a custom reason phrase.
|
static Response.StatusType |
from(Response.StatusType status,
String reason)
Create a new status type instance with a custom reason phrase.
|
public static Response.StatusType from(int code)
For standard status codes listed in Response.Status
enum, the default reason phrase
is used. For any other status code an empty string is used as a reason phrase.
code
- response status code.public static Response.StatusType from(int code, String reason)
code
- response status code.reason
- custom response status reason phrase.public static Response.StatusType from(Response.StatusType status, String reason)
status
- response status type.reason
- custom response status reason phrase.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.