You must restore an archive object before you read it. Do not call restoreObject for non-archive objects.

The status of an archived object throughout the restoration process is described as follows:
  1. By default, the archived object is in the frozen state.
  2. After you submit a restore request, the object is in the restoring state. It takes about one minute to complete the restore task.
  3. After the server completes the restore task, the object enters the restored state and you can read the object. By default, the restored state lasts 24 hours and can be extended by another 24 hours after you call RestoreObject again. During one restoration process, RestoreObject can be called on an object for up to seven times. In other words, an object can remain in the restored state for up to seven days.
  4. After the restored state expires, the object returns to the frozen state.

Run the following code to restore an archive object:

//Restore the archive.
RestoreObjectRequest restore = new RestoreObjectRequest();
restore.setBucketName("yourBucketName");
restore.setObjectKey("yourObjectName");
OSSAsyncTask task = oss.asyncRestoreObject(restore, new OSSCompletedCallback<RestoreObjectRequest,
        RestoreObjectResult>() {
    @Override
    public void onSuccess(RestoreObjectRequest request, RestoreObjectResult result) {
        OSSLog.logInfo("code::"+result.getStatusCode());

    }

    @Override
    public void onFailure(RestoreObjectRequest request, ClientException clientException,
                          ServiceException serviceException) {
        OSSLog.logError("error: "+serviceException.getRawMessage());

    }
});

task.waitUntilFinished();