docs: public static void write(Object value, MediaEncoder encoder, Writer out) throws IOException {
  		if(encoder==null) {
  			write(value, out);
  		} else {
  			// Otherwise, if A is null, then the result is "".
  			// Write nothing
  			if(value != null) {
  				// Unwrap out to avoid unnecessary validation of known valid output
  				while(true) {
  					out = unwrap(out);
  					if(out instanceof MediaValidator) {
  						MediaValidator validator = (MediaValidator)out;
  						if(validator.canSkipValidation(encoder.getValidMediaOutputType())) {
  							// Can skip validation, write directly to the wrapped output through the encoder
  							out = validator.getOut();
  						} else {
  							break;
  						}
  					} else {
  						break;
  					}
  				}
  				// Write through the given encoder
  				if(value instanceof String) {
  					// If A is a string, then the result is A.
  					encoder.write((String)value, out);
  				} else if(value instanceof Writable) {
  					Writable writable = (Writable)value;
  					if(writable.isFastToString()) {
  						encoder.write(writable.toString(), out);
  					} else {
  						// Avoid intermediate String from Writable
  						writable.writeTo(encoder, out);
  					}
  				} else if(value instanceof Node) {
  					// Otherwise, if is a DOM node, serialize the output
  					try {
  						// Can use thread-local or pooled transformers if performance is ever an issue
  						TransformerFactory transFactory = TransformerFactory.newInstance();
  						Transformer transformer = transFactory.newTransformer();
  						transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
  						transformer.transform(
  							new DOMSource((Node)value),
  							new StreamResult(new MediaWriter(encoder, out))
  						);
  					} catch(TransformerException e) {
  						throw new IOException(e);
  					}
  				} else {
  					// Otherwise, if A.toString() throws an exception, then raise an error
  					// Otherwise, the result is A.toString();
  					encoder.write(value.toString(), out);
  				}
  			}
  		}
  	}