()
| 190 | } |
| 191 | |
| 192 | void accept() { |
| 193 | String[] methodNames = new String[2]; |
| 194 | /* methodNames[0] = TransferDispatcher.NS_BYTESTREAMS; |
| 195 | methodNames[1] = TransferDispatcher.NS_IBB;*/ |
| 196 | methodNames[0] = TransferDispatcher.NS_IBB; |
| 197 | for (int i = 0; i < methodNames.length; i++) { |
| 198 | String nextMethod = methodNames[i]; |
| 199 | if (methods.indexOf(nextMethod) >= 0) { |
| 200 | method = nextMethod; |
| 201 | break; |
| 202 | } |
| 203 | } |
| 204 | if (method.length() != 0) { |
| 205 | started = System.currentTimeMillis(); |
| 206 | new Thread(this).start(); |
| 207 | } else { |
| 208 | JabberDataBlock badreq = new Iq(jid.toString(), Iq.TYPE_ERROR, id); |
| 209 | JabberDataBlock err = new XmppError(XmppError.BAD_REQUEST, "no known methods").construct(); |
| 210 | JabberDataBlock novalid = new JabberDataBlock("no-valid-streams"); |
| 211 | novalid.setNameSpace(TransferDispatcher.NS_SI); |
| 212 | err.addChild(novalid); |
| 213 | badreq.addChild(err); |
| 214 | TransferDispatcher.getInstance().send(badreq, false); |
| 215 | state = ERROR; |
| 216 | errMsg = SR.MS_REJECTED; |
| 217 | showEvent = true; |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | void writeFile(byte b[]) { |
| 222 | try { |
no test coverage detected