Apache Commons FTP storeFileStream returns null
问题 I am trying to upload a file in android to an FTP server using the apache.commons.ftp library. Note: I am using storeFileStream so that I can track the progress of the upload. ftpClient.enterLocalPassiveMode(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); InputStream inputStream = new FileInputStream(localFile); OutputStream outputStream = ftpClient.storeFileStream(remoteFile); byte[] buffer = new byte[8192]; int bytesRead; logMessage("Starting to upload file"); while ((bytesRead =