mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-07 02:30:10 -05:00
Close stream when done (StrictMode error)
This commit is contained in:
parent
d8030eaa7c
commit
564195bad9
@ -4010,11 +4010,15 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
@Override
|
@Override
|
||||||
public void writeTo(OutputStream out) throws IOException, MessagingException {
|
public void writeTo(OutputStream out) throws IOException, MessagingException {
|
||||||
InputStream in = getInputStream();
|
InputStream in = getInputStream();
|
||||||
Base64OutputStream base64Out = new Base64OutputStream(out);
|
|
||||||
try {
|
try {
|
||||||
IOUtils.copy(in, base64Out);
|
Base64OutputStream base64Out = new Base64OutputStream(out);
|
||||||
|
try {
|
||||||
|
IOUtils.copy(in, base64Out);
|
||||||
|
} finally {
|
||||||
|
base64Out.close();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
base64Out.close();
|
in.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user