org.apache.hc.core5.http.impl

## Class EnglishReasonPhraseCatalog

- java.lang.Object
- - org.apache.hc.core5.http.impl.EnglishReasonPhraseCatalog

- All Implemented Interfaces:
    ReasonPhraseCatalog

      @Contract(threading=IMMUTABLE)
      public class EnglishReasonPhraseCatalog
      extends Object
      implements ReasonPhraseCatalog

  English reason phrases for HTTP status codes.
  Since:
    4.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EnglishReasonPhraseCatalog` | `INSTANCE` The default instance of this catalog.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EnglishReasonPhraseCatalog()` Restricted default constructor, for derived classes.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getReason(int status, Locale loc)` Obtains the reason phrase for a status code.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final EnglishReasonPhraseCatalog INSTANCE

      The default instance of this catalog. This catalog is thread safe, so there typically is no need to create other instances.

  - ### Constructor Detail

    - #### EnglishReasonPhraseCatalog

          protected EnglishReasonPhraseCatalog()

      Restricted default constructor, for derived classes. If you need an instance of this class, use `INSTANCE`.

  - ### Method Detail

    - #### getReason

          public String getReason(int status,
                         Locale loc)

      Obtains the reason phrase for a status code.
      Specified by:
        `getReason` in interface `ReasonPhraseCatalog`
      Parameters:
        `status` - the status code, in the range 100-599
        `loc` - ignored
      Returns:
        the reason phrase, or `null`

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.