return DEFAULT_CONTENT_LENGTH;
}
for (Propstat propstat : list)
{
if (propstat.getProp() != null) {
Getcontentlength gcl = propstat.getProp().getGetcontentlength();
if ((gcl != null) && (gcl.getContent().size() == 1))
{
try
{
return Long.parseLong(gcl.getContent().get(0));
}
catch (NumberFormatException e)
{
log.warn(String.format("Failed to parse content length %s", gcl.getContent().get(0)));
}
}
}
}
return DEFAULT_CONTENT_LENGTH;