tmpFile = File.createTempFile(TMP_PREFIX + Text.escape(memberName), null, null);
FileOutputStream out = new FileOutputStream(tmpFile);
IOUtil.spool(in, out);
out.close();
// try to parse the request body into a 'values' property.
ValuesProperty vp = buildValuesProperty(new FileInputStream(tmpFile));
if (vp != null) {
if (JCR_VALUE.equals(vp.getName())) {
n.setProperty(memberName, vp.getJcrValue());
} else {
n.setProperty(memberName, vp.getJcrValues());
}
} else {
// request body cannot be parsed into a 'values' property.
// fallback: try to import as single value from stream.
n.setProperty(memberName, new FileInputStream(tmpFile));