try {
notifyingIn = new NotifyingFileInputStream(content, contentLength, s, listener);
RequestEntity requestEntity;
if (contentLength == null) {
log.trace("no content length");
requestEntity = new InputStreamRequestEntity(notifyingIn, contentType);
} else {
requestEntity = new InputStreamRequestEntity(notifyingIn, contentLength, contentType);
}
p.setRequestEntity(requestEntity);
int result = client.executeMethod(p);
return result;
} catch (IOException ex) {