public int getSize() {
      return key.length + (value == null ? 0 : value.length);
    }
Returns the size in bytes of the serialized key and value.

@return the record size
geode-core/src/main/java/org/apache/geode/internal/cache/snapshot/SnapshotPacket.java