@Contract(threading=IMMUTABLE) public class EnglishReasonPhraseCatalog extends java.lang.Object implements ReasonPhraseCatalog
Modifier and Type | Field and Description |
---|---|
static EnglishReasonPhraseCatalog |
INSTANCE
The default instance of this catalog.
|
private static java.lang.String[][] |
REASON_PHRASES
Reason phrases lookup table.
|
Modifier | Constructor and Description |
---|---|
protected |
EnglishReasonPhraseCatalog()
Restricted default constructor, for derived classes.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getReason(int status,
java.util.Locale loc)
Obtains the reason phrase for a status code.
|
private static void |
setReason(int status,
java.lang.String reason)
Stores the given reason phrase, by status code.
|
public static final EnglishReasonPhraseCatalog INSTANCE
private static final java.lang.String[][] REASON_PHRASES
protected EnglishReasonPhraseCatalog()
INSTANCE
.public java.lang.String getReason(int status, java.util.Locale loc)
getReason
in interface ReasonPhraseCatalog
status
- the status code, in the range 100-599loc
- ignorednull
private static void setReason(int status, java.lang.String reason)
status
- the status code for which to define the phrasereason
- the reason phrase for this status code