InternalValue val = values[i];
switch (state.getType()) {
case PropertyType.BINARY:
// special handling required for binary value:
// spool binary value to file in blob store
BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
long size = blobVal.getLength();
if (size < 0) {
log.warn("Blob has negative size. Potential loss of data. " +
"id={} idx={}", state.getId(), String.valueOf(i));
out.writeInt(0);