private void capabilityVendorSpecificTileset(
      StringBuilder str, TileLayer layer, GridSubset grid, String formatStr, String styleName)
      throws GeoWebCacheException {

    String srsStr = grid.getSRS().toString();
    StringBuilder resolutionsStr = new StringBuilder();
    double[] res = grid.getResolutions();
    for (int i = 0; i < res.length; i++) {
      resolutionsStr.append(Double.toString(res[i]) + " ");
    }

    String[] bs = boundsPrep(grid.getCoverageBestFitBounds());

    str.append("    <TileSet>\n");
    str.append("      <SRS>" + srsStr + "</SRS>\n");
    str.append(
        "      <BoundingBox SRS=\""
            + srsStr
            + "\" minx=\""
            + bs[0]
            + "\" miny=\""
            + bs[1]
            + "\"  maxx=\""
            + bs[2]
            + "\"  maxy=\""
            + bs[3]
            + "\" />\n");
    str.append("      <Resolutions>" + resolutionsStr.toString() + "</Resolutions>\n");
    str.append("      <Width>" + grid.getTileWidth() + "</Width>\n");
    str.append("      <Height>" + grid.getTileHeight() + "</Height>\n");
    str.append("      <Format>" + formatStr + "</Format>\n");
    str.append("      <Layers>" + layer.getName() + "</Layers>\n");
    str.append("      <Styles>").append(ServletUtils.URLEncode(styleName)).append("</Styles>\n");
    str.append("    </TileSet>\n");
  }