code: public void write(Object object, OutputStream os, MediaType mediaType)
              throws IOException {
          XStream xstream = getXStreamInstance(mediaType);
          if (xstream != null) {
              xstream.toXML(object, os);
          } else {
              throw new IllegalArgumentException("Content-type: "
                      + mediaType.getType() + " is currently not supported for "
                      + object.getClass().getName());
          }
      }
docs: /*
  (non-Javadoc)
  
  @see com.netflix.discovery.provider.ISerializer#write(java.lang.Object,
  java.io.OutputStream, javax.ws.rs.core.MediaType)