if((buffer.position() == 0) && (buffer.limit() == buffer.capacity())) {
newValue = buffer.array();
} else {
newValue = Arrays.copyOfRange(buffer.array(), buffer.position(), buffer.limit());
}
BlobAsync blob = new BlobAsync(blobDir);
blob.truncate(txn.getTransaction(), 0).get();
blob.write(txn.getTransaction(), 0, newValue).get();
} else {
dir.removeIfExists(txn.getTransaction(), PathUtil.from(schema)).get();
}
return buffer;
}