@Override
  public Object getDataValue() {
    String dataType = getDataType();
    if (dataType == null || dataType.equals("N/A")) {
      return null;
    } else if (isCompressed()) {
      return ((OffHeapStoredObject) block).getCompressedBytes();
    } else if (!isSerialized()) {
      // byte array
      // return "byte[" + ((Chunk)this.block).getDataSize() + "]";
      return ((OffHeapStoredObject) block).getRawBytes();
    } else {
      try {
        byte[] bytes = ((OffHeapStoredObject) block).getRawBytes();
        return DataSerializer.readObject(DataType.getDataInput(bytes));
      } catch (IOException e) {
        e.printStackTrace();
        return "IOException:" + e.getMessage();
      } catch (ClassNotFoundException e) {
        e.printStackTrace();
        return "ClassNotFoundException:" + e.getMessage();
      } catch (CacheClosedException e) {
        e.printStackTrace();
        return "CacheClosedException:" + e.getMessage();
      }
    }
  }
Basic implementation of MemoryBlock for test validation only.
geode-core/src/main/java/org/apache/geode/internal/offheap/MemoryBlockNode.java