code: private int getFieldTableLength(Map<String, Object> fieldTable) {
          int len = 4;   // size of the field-table itself
  
          for (Map.Entry<String, Object> pair : fieldTable.entrySet()) {
              String key = pair.getKey();
              pair.getValue(); // Expecting this to be Boolean
              
              len += 1;                // size of the key
              len += key.length();     // key itself
              
              len += 1;                // field type
              len += 1;                // field value -- 1 for true, 0 for false
          } 
  
          return len;
      }
docs: -------------------------- Private Methods ---------------------------