1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-30 23:00:09 -05:00

Close stream when done (StrictMode error)

This commit is contained in:
Joe Steele 2013-08-07 19:20:49 -04:00
parent d8030eaa7c
commit 564195bad9

View File

@ -4010,12 +4010,16 @@ public class LocalStore extends Store implements Serializable {
@Override
public void writeTo(OutputStream out) throws IOException, MessagingException {
InputStream in = getInputStream();
try {
Base64OutputStream base64Out = new Base64OutputStream(out);
try {
IOUtils.copy(in, base64Out);
} finally {
base64Out.close();
}
} finally {
in.close();
}
}
public Uri getContentUri() {