diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-28 02:35:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-28 02:35:07 +0000 |
commit | 281998c825ad48d842bb653e2f462719fdb0c1d9 (patch) | |
tree | bc8bfcce809257b3ddbb423a9808082292b9f6a3 /java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java')
-rw-r--r-- | java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java b/java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java index 753b70f23..d1521bdcb 100644 --- a/java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java +++ b/java/com/android/voicemail/impl/mail/internet/BinaryTempFileBody.java @@ -36,7 +36,7 @@ import org.apache.commons.io.IOUtils; * closed the file is deleted and the Body should be considered disposed of. */ public class BinaryTempFileBody implements Body { - private File mFile; + private File file; /** * An alternate way to put data into a BinaryTempFileBody is to simply supply an already- created @@ -45,19 +45,19 @@ public class BinaryTempFileBody implements Body { * @param filePath The file containing the data to be stored on disk temporarily */ public void setFile(String filePath) { - mFile = new File(filePath); + file = new File(filePath); } public OutputStream getOutputStream() throws IOException { - mFile = File.createTempFile("body", null, TempDirectory.getTempDirectory()); - mFile.deleteOnExit(); - return new FileOutputStream(mFile); + file = File.createTempFile("body", null, TempDirectory.getTempDirectory()); + file.deleteOnExit(); + return new FileOutputStream(file); } @Override public InputStream getInputStream() throws MessagingException { try { - return new BinaryTempFileBodyInputStream(new FileInputStream(mFile)); + return new BinaryTempFileBodyInputStream(new FileInputStream(file)); } catch (IOException ioe) { throw new MessagingException("Unable to open body", ioe); } @@ -69,7 +69,7 @@ public class BinaryTempFileBody implements Body { Base64OutputStream base64Out = new Base64OutputStream(out, Base64.CRLF | Base64.NO_CLOSE); IOUtils.copy(in, base64Out); base64Out.close(); - mFile.delete(); + file.delete(); in.close(); } @@ -81,7 +81,7 @@ public class BinaryTempFileBody implements Body { @Override public void close() throws IOException { super.close(); - mFile.delete(); + file.delete(); } } } |