code: public synchronized OutputStream sendFile(String fileName, long fileSize,
              String description) throws XMPPException, SmackException, InterruptedException {
          if (isDone() || outputStream != null) {
              throw new IllegalStateException(
                      "The negotiation process has already"
                              + " been attempted on this file transfer");
          }
          try {
              setFileInfo(fileName, fileSize);
              this.outputStream = negotiateStream(fileName, fileSize, description);
          } catch (XMPPErrorException e) {
              handleXMPPException(e);
              throw e;
          }
          return outputStream;
      }
docs: This method handles the negotiation of the file transfer and the stream,
  it only returns the created stream after the negotiation has been completed.
  
  @param fileName
  The name of the file that will be transmitted. It is
  preferable for this name to have an extension as it will be
  used to determine the type of file it is.
  @param fileSize
  The size in bytes of the file that will be transmitted.
  @param description
  A description of the file that will be transmitted.
  @return The OutputStream that is connected to the peer to transmit the
  file.
  @throws XMPPException
  Thrown if an error occurs during the file transfer
  negotiation process.
  @throws SmackException if there was no response from the server.
  @throws InterruptedException