DrmConvertedStatuspublic class DrmConvertedStatus extends Object An entity class that wraps converted data, conversion status, and the
offset for appending the header and body signature to the converted data.
An instance of this class may be created two ways by the drm framework:
a) a call to {@link DrmManagerClient#convertData DrmManagerClient.convertData()} and
b) a call to {@link DrmManagerClient#closeConvertSession DrmManagerClient.closeConvertSession()}.
An valid offset value is provided only from a success call to
{@link DrmManagerClient#closeConvertSession DrmManagerClient.closeConvertSession()}. |
Fields Summary |
---|
public static final int | STATUS_OKIndicate the conversion status is successful. | public static final int | STATUS_INPUTDATA_ERRORIndicate a failed conversion status due to input data. | public static final int | STATUS_ERRORIndicate a general failed conversion status. | public final int | statusCodeStatus code for the conversion. Must be one of the defined status
constants above. | public final byte[] | convertedDataConverted data. It is optional and thus can be null. | public final int | offsetOffset value for the body and header signature. |
Constructors Summary |
---|
public DrmConvertedStatus(int statusCode, byte[] convertedData, int offset)Creates a DrmConvertedStatus object with the specified parameters.
if (!isValidStatusCode(statusCode)) {
throw new IllegalArgumentException("Unsupported status code: " + statusCode);
}
this.statusCode = statusCode;
this.convertedData = convertedData;
this.offset = offset;
|
Methods Summary |
---|
private boolean | isValidStatusCode(int statusCode)
return statusCode == STATUS_OK ||
statusCode == STATUS_INPUTDATA_ERROR ||
statusCode == STATUS_ERROR;
|
|