/** * Negotiates the stream method to transfer the file over and then returns * the negotiated stream. * * @return The negotiated InputStream from which to read the data. * @throws SmackException * @throws XMPPErrorException If there is an error in the negotiation process an exception * is thrown. * @throws InterruptedException */ public InputStream receiveFile() throws SmackException, XMPPErrorException, InterruptedException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPErrorException e) { setException(e); throw e; } return inputStream; }
setException(e); return; setStatus(Status.error); setError(Error.bad_file); setException(e); setException(e);
private void handleXMPPException(XMPPException e) { setStatus(FileTransfer.Status.error); setException(e); }
private void handleXMPPException(XMPPException e) { setStatus(FileTransfer.Status.error); setException(e); }
private void handleXMPPException(XMPPException e) { setStatus(FileTransfer.Status.ERROR); setException(e); }
private void handleXMPPException(XMPPException e) { setStatus(Status.error); setException(e); }
/** * Negotiates the stream method to transfer the file over and then returns * the negotiated stream. * * @return The negotiated InputStream from which to read the data. * @throws XMPPException If there is an error in the negotiation process an exception * is thrown. */ public InputStream recieveFile() throws XMPPException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPException e) { setException(e); throw e; } return inputStream; }
/** * Negotiates the stream method to transfer the file over and then returns * the negotiated stream. * * @return The negotiated InputStream from which to read the data. * @throws XMPPException If there is an error in the negotiation process an exception * is thrown. */ public InputStream recieveFile() throws XMPPException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPException e) { setException(e); throw e; } return inputStream; }
/** * Negotiates the stream method to transfer the file over and then returns * the negotiated stream. * * @return The negotiated InputStream from which to read the data. * @throws XMPPException If there is an error in the negotiation process an exception * is thrown. */ public InputStream recieveFile() throws XMPPException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPException e) { setException(e); throw e; } return inputStream; }
/** * Negotiates the stream method to transfer the file over and then returns * the negotiated stream. * * @return The negotiated InputStream from which to read the data. * @throws XMPPException If there is an error in the negotiation process an exception * is thrown. */ public InputStream recieveFile() throws XMPPException { if (inputStream != null) { throw new IllegalStateException("Transfer already negotiated!"); } try { inputStream = negotiateStream(); } catch (XMPPException e) { setException(e); throw e; } return inputStream; }
setStatus(FileTransfer.Status.ERROR); setError(Error.STREAM); setException(e); setException(e);
setStatus(Status.error); setError(Error.stream); setException(e); setException(e);
setStatus(Status.error); setError(Error.stream); setException(e); setException(e);
setStatus(Status.error); setError(Error.stream); setException(e); setException(e);