Code example for SocketException

0
            if (index != -1) {
                int fromIndex = 0;
                while (index != -1) {
                    cipher = requestedCiphers.substring(fromIndex, index).trim();
                    if (cipher.length() > 0) {
                        /* 
                         * Check to see if the requested cipher is among the 
                         * supported ciphers, i.e., may be enabled 
                         */ 
                        for (int i=0; supportedCiphers != null
                                     && i<supportedCiphers.length; i++) {
                            if (supportedCiphers[i].equals(cipher)) {
                                if (vec == null) {
                                    vec = new Vector();
                                } 
                                vec.addElement(cipher);
                                break; 
                            } 
                        } 
                    } 
                    fromIndex = index+1;