private String doCollection(ASN1Encodable[] asn1Encodables) throws IOException {
        switch (asn1Encodables.length) {
            case 1:
                // one row, one column
                return "<table><tr><td colspan='2'>" + doPrimitive(asn1Encodables[0].toASN1Primitive()) + "</td></tr></table>";

            case 2:
                // one row, two columns
                return "<table><tr><td>" + doPrimitive(asn1Encodables[0].toASN1Primitive()) + "</td>"
                        + "<td>" + doPrimitive(asn1Encodables[1].toASN1Primitive()) + "</td></tr></table>";

            default:
                // a row per per item
                final StringBuilder sb = new StringBuilder();
                for (ASN1Encodable asn1Encodable : asn1Encodables) {
                    sb.append("<table><tr><td colspan='2'>").append(doPrimitive(asn1Encodable.toASN1Primitive())).append("</td></tr></table>");
                }
                return sb.toString();
        }
    }
Creates a table that represents an ASN.1 encoded DER value.

This tag creates a HTML table, that consists of one or two columns and an unspecified number of rows. Each cell
can contain a nested table (of similar format).
xmppserver/src/main/java/org/jivesoftware/admin/ASN1DERTag.java