How to decrypt a file and add it into a list of strings
<p>At the line where I out.write(buffer, 0, rumRead), how can I add that to a defined list instead of writing to a file? I tried adding it to an Object list, but that doesn't work.
Here's my decrypt method:</p>

<pre><code>public static void decrypt(String file) {
    try {
        File output = new File(file.replace(encryptedFileType, initialFileType));
        if (!(output.exists())) {
            output.createNewFile();
        }
        InputStream in = new FileInputStream(file.replace(initialFileType, encryptedFileType));
        OutputStream out = new FileOutputStream(output);
        in = new CipherInputStream(in, dcipher);
        int numRead = 0;
        while ((numRead = in.read(buffer)) &gt;= 0) {
            out.write(buffer, 0, numRead);
        }
        out.close();
        new File(file.replace(initialFileType, encryptedFileType)).delete();
        } catch (IOException e) {
        e.printStackTrace();
    }
}
</code></pre>
