open override fun write(): Metadata

Encodes and writes this metadata to the new instance of Metadata.

This method encodes all available data, including version and flags. Due to technical limitations, it is not possible to write the metadata when the specified version is less than 1.4.


if metadata is malformed or metadata was read in lenient mode and cannot be written back or version of this instance is less than 1.4.