private void appendOffsets() {
    int fieldDataSize = getCurrentOffset();
    // Take the list of offsets and append it in reverse order.
    byte sizeOfOffset = getSizeOfOffset(vlfCount, fieldDataSize);
    for (int i = (vlfCount - 1); i >= 0; i--) {
      switch (sizeOfOffset) {
        case 1:
          os.write((byte) vlfOffsets[i]);
          break;
        case 2:
          os.writeShort((short) vlfOffsets[i]);
          break;
        case 4:
          os.writeInt(vlfOffsets[i]);
          break;
        default:
          break;
      }
    }
  }
Must be invoked only after {@link PdxSerializable#toData(PdxWriter)}
geode-core/src/main/java/org/apache/geode/pdx/internal/PdxWriterImpl.java