public String parseOtherName( byte[] item )
    {
        if ( item == null || item.length == 0 )
        {
            return null;
        }

        try ( final ASN1InputStream decoder = new ASN1InputStream( item ) )
        {
            ASN1Primitive object = decoder.readObject();
            if (object instanceof DLTaggedObject) {
                final DLTaggedObject taggedObject = (DLTaggedObject) object;
                object = (ASN1Sequence) taggedObject.getBaseObject();
            }

            // By specification, OtherName instances must always be an ASN.1 Sequence.
            final ASN1Sequence otherNameSeq = (ASN1Sequence) object;

            // By specification, an OtherName instance consists of:
            // - the type-id (which is an Object Identifier), followed by:
            // - a tagged value, of which the tag number is 0 (zero) and the value is defined by the type-id.
            final ASN1ObjectIdentifier typeId = (ASN1ObjectIdentifier) otherNameSeq.getObjectAt( 0 );
            final ASN1TaggedObject taggedValue = (ASN1TaggedObject) otherNameSeq.getObjectAt( 1 );

            final int tagNo = taggedValue.getTagNo();
            if ( tagNo != 0 )
            {
                throw new IllegalArgumentException( "subjectAltName 'otherName' sequence's second object is expected to be a tagged value of which the tag number is 0. The tag number that was detected: " + tagNo );
            }
            final ASN1Primitive value = taggedValue.toASN1Primitive();

            switch ( typeId.getId() )
            {
                case OTHERNAME_SRV_OID:
                    return parseOtherNameDnsSrv( value );

                case OTHERNAME_XMPP_OID:
                    return parseOtherNameXmppAddr( value );
                    
                case OTHERNAME_UPN_OID:
                    return parseOtherNameUpn( value );

                default:
                    String otherName = parseOtherName(typeId, value);
                    if (otherName != null) {
                        return otherName;
                    }
                    Log.debug( "Ignoring subjectAltName 'otherName' type-id '{}' that's neither id-on-xmppAddr nor id-on-dnsSRV.", typeId.getId() );
                    return null;
            }
        }
        catch ( Exception e )
        {
            Log.warn( "Unable to parse a byte array (of length {}) as a subjectAltName 'otherName'. It is ignored.", item.length, e );
            return null;
        }
    }
Parses the byte-array representation of a subjectAltName 'otherName' entry.
<p>
The provided 'OtherName' is expected to have this format:
<pre>{@code
OtherName ::= SEQUENCE {
type-id    OBJECT IDENTIFIER,
value      [0] EXPLICIT ANY DEFINED BY type-id }
}</pre>

@param item A byte array representation of a subjectAltName 'otherName' entry (cannot be null).
@return an xmpp address, or null when the otherName entry does not relate to XMPP (or fails to parse).
xmppserver/src/main/java/org/jivesoftware/util/cert/SANCertificateIdentityMapping.java