mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Backport a bit of memory efficiency I'm not sure I believe from AOSP
This commit is contained in:
parent
0bb115ca42
commit
134c0b23dd
@ -385,10 +385,12 @@ public class MimeUtility
|
||||
* Now we read the part into a buffer for further processing. Because
|
||||
* the stream is now wrapped we'll remove any transfer encoding at this point.
|
||||
*/
|
||||
final InputStream in = part.getBody().getInputStream();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
InputStream in = part.getBody().getInputStream();
|
||||
IOUtils.copy(in, out);
|
||||
in.close();
|
||||
in = null; // we want all of our memory back, and close might not release
|
||||
// Cargo culted from AOSP - This disagrees with the platform docs
|
||||
|
||||
/*
|
||||
* Convert and return as new String
|
||||
|
Loading…
Reference in New Issue
Block a user