Package com.castlabs.android.drm

# Class DrmTodayResponseCode

java.lang.Object
com.castlabs.android.drm.DrmTodayResponseCode

public class DrmTodayResponseCode extends Object
DRMToday response code holder and parser. This class handles the parsing and representation of DRMToday service response codes, which are used to indicate the status or error conditions of DRM operations.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static @interface`
  `DrmTodayResponseCode.ErrorCode`
  Annotation that defines the valid error codes for DRMToday responses.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `responseCode`
  The numeric response code from the DRMToday service.
  `final String`
  `responseCodeString`
  The original string representation of the response code.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DrmTodayResponseCode`
  `create(Map<String,List<String>> responseHeaders)`
  Parses response headers and creates corresponding `DrmTodayResponseCode`.

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

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

- ## Field Details

  - ### responseCode

    public final int responseCode
    The numeric response code from the DRMToday service. This field contains the parsed integer value of the response code.

  - ### responseCodeString

    @Nullable public final String responseCodeString
    The original string representation of the response code. This field contains the raw response code as received from the service.

- ## Method Details

  - ### create

    @Nullable public static DrmTodayResponseCode create(@Nullable Map<String,List<String>> responseHeaders)
    Parses response headers and creates corresponding `DrmTodayResponseCode`. This method extracts the DRMToday response code from HTTP response headers and creates a new instance with the parsed code.
    Parameters:
      `responseHeaders` - HTTP response headers to be parsed for the error code
    Returns:
      `DrmTodayResponseCode` or `null` if the response code is not available