Create files from zip - android
<p>I have a folder <code>/mnt/sdcard/Bluetooth</code> which contains several <code>zip</code> files. Each of this zip-files contains only one file. How can I extract the content for each of these zip-files into a new file, containing the content of each zip-file? This is what I've done so far:</p>

<pre><code>public class Main extends Activity {

Object[] arrayOfRarFiles;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    String path = "/mnt/sdcard/Bluetooth";
    String nameOfFiles;
    File folder = new File(path);
    File[] listOfFiles = folder.listFiles();

    for (int i = 0; i &lt; listOfFiles.length; i++) {
        if (listOfFiles[i].isFile()) {
            nameOfFiles = listOfFiles[i].getName();

            if (nameOfFiles.endsWith(".zip")
                    || nameOfFiles.endsWith(".ZIP")) {

                try {
                    extractFile(nameOfFiles);
                } catch (FileNotFoundException e) {
                    Log.e("EXTRACTFILE SAYS: ", e.getMessage());
                }

            }
        }
    }
}

public void extractFile(String path) throws FileNotFoundException {

    String zipFileName = "/mnt/sdcard/Bluetooth/" + path;
    String extractedFileName = getApplicationContext().getFilesDir()
            .getPath().toString()
            + "Finger.FIR";

    ZipInputStream inStream = new ZipInputStream(new FileInputStream(
            zipFileName));
    OutputStream outStream = new FileOutputStream(extractedFileName);





    Toast.makeText(getApplicationContext(), zipFileName,
            Toast.LENGTH_SHORT).show();

}
</code></pre>

<p>The last toast, in the <code>extractFile</code> method outputs the name of each zip-file. The file inside the zip-folders are <code>.FIR</code> files</p>
