protected void updateActivityNodeFile(String requestUrl, String fileName, InputStream fileContent, String mimeType) throws ClientServicesException {
try {
Map<String, String> xheaders = new HashMap<String, String>();
xheaders.put(X_IBM_UPLOAD_METHOD, UPLOAD_METHOD_PHASES);
xheaders.put(X_IBM_UPLOAD_SIZE, "" + fileContent.available());
Response xresponse = putData(requestUrl, null, xheaders, null, null);
checkResponseCode(xresponse, HTTPCode.OK);
String token = xresponse.getResponseHeader(X_IBM_UPLOAD_TOKEN);
Map<String, String> headers = new HashMap<String, String>();
headers.put(SLUG, fileName);
headers.put(CONTENT_TYPE, mimeType);
headers.put(TITLE, fileName);
headers.put(X_IBM_UPLOAD_TOKEN, token);
headers.put(X_IBM_UPLOAD_METHOD, UPLOAD_METHOD_PHASES);
Response response = putData(requestUrl, null, headers, fileContent, null);
checkResponseCode(response, HTTPCode.OK);
} catch (ClientServicesException e) {
throw e;
} catch (Exception e) {
throw new ClientServicesException(e);