public void toWriter(final CompoundBinaryTag input, final Writer dest) throws IOException {
    try (final TagStringWriter emit = new TagStringWriter(dest, this.indent)) {
      emit.legacy(this.emitLegacy);
      emit.writeTag(input);
    }
  }
Writes a tag to in string format.

<p>The provided {@link Writer} will remain open after reading a tag.</p>

@param input Tag to write
@param dest Writer to write to
@throws IOException if any IO or syntax errors occur while parsing
@since 4.0.0
nbt/src/main/java/net/kyori/adventure/nbt/TagStringIO.java