code: public byte[] transform(Source xmlSource, URIResolver uriResolver, ErrorListener errorListener) throws TransformerException {
      	if (xmlSource == null) {
      		throw new IllegalArgumentException("xmlSource is null");
      	}
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          StreamResult result = new StreamResult(out);
          transform(xmlSource, uriResolver, errorListener, result);
          return out.toByteArray();
      }
docs: Transform XML source using the wrapped XSL transformer of this instance and return a byte array of the result.
  @param xmlSource source XML
  @param uriResolver URI resolver or null
  @param errorListener error listener or null
  @return byte array of the result
  @throws TransformerException if an exception occurs while transforming