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/Base64Body.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/voicemail/impl/mail/Base64Body.java')
-rw-r--r-- | java/com/android/voicemail/impl/mail/Base64Body.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/com/android/voicemail/impl/mail/Base64Body.java b/java/com/android/voicemail/impl/mail/Base64Body.java index def94dbb5..5c14296af 100644 --- a/java/com/android/voicemail/impl/mail/Base64Body.java +++ b/java/com/android/voicemail/impl/mail/Base64Body.java @@ -23,17 +23,17 @@ import java.io.OutputStream; import org.apache.commons.io.IOUtils; public class Base64Body implements Body { - private final InputStream mSource; + private final InputStream source; // Because we consume the input stream, we can only write out once - private boolean mAlreadyWritten; + private boolean alreadyWritten; public Base64Body(InputStream source) { - mSource = source; + this.source = source; } @Override public InputStream getInputStream() throws MessagingException { - return mSource; + return source; } /** @@ -47,15 +47,15 @@ public class Base64Body implements Body { @Override public void writeTo(OutputStream out) throws IllegalStateException, IOException, MessagingException { - if (mAlreadyWritten) { + if (alreadyWritten) { throw new IllegalStateException("Base64Body can only be written once"); } - mAlreadyWritten = true; + alreadyWritten = true; try { final Base64OutputStream b64out = new Base64OutputStream(out, Base64.DEFAULT); - IOUtils.copyLarge(mSource, b64out); + IOUtils.copyLarge(source, b64out); } finally { - mSource.close(); + source.close(); } } } |