int written = 0;
OperationStatus status = getMessageContentDb().get(null, contentKeyEntry, value, LockMode.READ_UNCOMMITTED);
if (status == OperationStatus.SUCCESS)
{
byte[] dataAsBytes = contentTupleBinding.entryToObject(value);
int size = dataAsBytes.length;
if (offset > size)
{
throw new RuntimeException("Offset " + offset + " is greater than message size " + size
+ " for message id " + messageId + "!");