How to download xml file from ftp using following android code?
<p>I used following code for downloading XML file from ftp to android phone memory using that i able to connect ftp but while retrieving XML to local memory it is giving following exception 07-19 15:01:03.721: DEBUG/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
 please help somebody thank you,</p>

<p><strong>Java class</strong></p>

<pre><code>private void fnfileDownloadBuf()
{

    FTPClient client = new FTPClient();
FileOutputStream fos = null;

try {
    //client.connect("ftp://ftp.qualityinaction.net/QIA/Questions/Airlines/");
    client.connect("ftp.qualityinaction.net");
    client.login("qualityinaction.net","password");
    client.setFileType(FTP.BINARY_FILE_TYPE);

    //
    // The remote filename to be downloaded.
    //
   // String filename = "/QIA/Questions/Airlines/index.xml";
    String filename = getFilesDir().getAbsolutePath()+ File.separator + "/index.xml";
   // String filename = "/QIA/Questions/Airlines/index.xml";
    File file = new File(filename);
    fos = new FileOutputStream(file);

    //
    // Download file from FTP server
    //
    //client.retrieveFile("/" + filename, fos);
    client.retrieveFile("/QIA/Questions/Airlines/index.xml;type=i", fos);
   // client.retrieveFile( getFilesDir().getAbsolutePath()+ File.separator + "/index.xml", fos);
} catch (IOException e) {
    e.printStackTrace();
} finally {
    try {
        if (fos != null) {
            fos.close();
        }
        client.disconnect();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}
</code></pre>

<p><strong>manifest XML file</strong></p>

<pre><code>&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
</code></pre>

<p><strong>Exception</strong></p>

<pre><code>exception 07-19 15:01:03.721: DEBUG/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
</code></pre>
