Note that there are some explanatory texts on larger screens.

plurals
  1. POuse commons-net ftp api. i want download file but this file size 0
    primarykey
    data
    text
    <p>I make simple application using commons-net-3.1 library I want download file from FTP server, but downloaded file's size is 0 This file name is mixed english, symbol(like "-", "_", etc...), other language(like korean, japanese, etc...). How to solve this problum? T.T</p> <p>Here is code</p> <pre><code>/** * download file. it works thread * * @param source * file path witch is remote path * @param destination * file path witch is saving local memory */ public void downloadFile(String source, String destination) { DownloadTempFile download = new DownloadTempFile(source, destination); download.setDaemon(true); download.start(); } class DownloadTempFile extends Thread { String source, destination; public DownloadTempFile(String source, String destination) { this.source = source; this.destination = destination; } public void run() { OutputStream output = null; try { File local = new File(destination); output = new FileOutputStream(local); ftpClient.retrieveFile(source, output); } catch (Exception e) { // TODO: handle exception } } } </code></pre> <p>and, this code is call upper method</p> <pre><code>String tempPath = mSDpath + "/mgtec/temp"; File d = new File(tempPath); if (d.isDirectory()) { String tempFile = tempPath + "/tmp" + position + ".mp3"; NativeMusicAppActivity.mConnector.downloadFile(mAdapter .getItem(position).toString(), tempFile); } else { if (d.mkdirs()) { String tempFile = tempPath + "/tmp" + position + ".mp3"; NativeMusicAppActivity.mConnector.downloadFile(mAdapter .getItem(position).toString(), tempFile); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload