code: @Nullable
    byte[][] serialize() {
      if (len() == cap()) {
        return namesAndValues;
      }
      byte[][] serialized = new byte[len()][];
      System.arraycopy(namesAndValues, 0, serialized, 0, len());
      return serialized;
    }
docs: Serialize all the metadata entries.
  
  <p>It produces serialized names and values interleaved. result[i*2] are names, while
  result[i*2+1] are values.
  
  <p>Names are ASCII string bytes that contains only the characters listed in the class comment
  of {@link Key}. If the name ends with {@code "-bin"}, the value can be raw binary. Otherwise,
  the value must contain only characters listed in the class comments of {@link AsciiMarshaller}
  
  <p>The returned individual byte arrays <em>must not</em> be modified. However, the top level
  array may be modified.
  
  <p>This method is intended for transport use only.