public byte[] ReadData(long offset, int length) { if (length > 512 * 1024) { throw new DatabaseException("Request length exceeds 512 KB"); } try { // Read the blob part into the byte array. var blobPart = new byte[length]; obj.Read(offset, blobPart, length); // And return as a StreamableObjectPart object. return(blobPart); } catch (IOException e) { throw new DatabaseException("Exception while reading blob: " + e.Message, e); } }