initProperties();
}
// export properties
outputContext.setModificationTime(getModificationTime());
DavProperty etag = getProperty(DavPropertyName.GETETAG);
if (etag != null) {
outputContext.setETag(String.valueOf(etag.getValue()));
}
DavProperty contentType = getProperty(DavPropertyName.GETCONTENTTYPE);
if (contentType != null) {
outputContext.setContentType(String.valueOf(contentType.getValue()));
}
DavProperty contentLength = getProperty(DavPropertyName.GETCONTENTLENGTH);
if (contentLength != null) {
try {
long length = Long.parseLong(contentLength.getValue() + "");
if (length > 0) {
outputContext.setContentLength(length);
}
} catch (NumberFormatException e) {
log.error("Could not build content length from property value '" + contentLength.getValue() + "'");
}
}
DavProperty contentLanguage = getProperty(DavPropertyName.GETCONTENTLANGUAGE);
if (contentLanguage != null) {
outputContext.setContentLanguage(contentLanguage.getValue().toString());
}
// spool content
InputStream in = getStream();
OutputStream out = outputContext.getOutputStream();