}
public void evictUpdatedResourcesFromCache(String subscriberId, InputStream updateMessageStream, String serverSignature) throws FitbitAPIException {
try {
if (null == serverSignature) {
throw new FitbitAPISecurityException("Missing signature.");
}
String updateMessage = APIUtil.inputStreamToString(updateMessageStream);
String ourSignature = APIUtil.generateSignature(updateMessage, subscriberSecret);
if (null == ourSignature || !ourSignature.equals(serverSignature)) {
throw new FitbitAPISecurityException("Signatures do not match, given " + serverSignature);
}
UpdateNotification notification = new UpdateNotification(new JSONArray(updateMessage));
int i = 0;