// write calc digest hash
// we need hash at first to know do we have to store file or just use one
// existing (with same hash)
File temp = new File(tempDir, IdGenerator.generate() + "-" + propertyId + orderNumb + TEMP_FILE_EXTENSION);
FileDigestOutputStream out = cas.openFile(temp);
try
{
long contentSize = writeOutput(out, value);
sizeHandler.accumulateNewSize(contentSize);
}
finally
{
out.close();
}
// CAS hash
vcasHash = out.getDigestHash();
// add reference to content
// get VCAS-named file
vcasFile = cas.getFile(vcasHash);