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/store/imap/ImapMemoryLiteral.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java')
-rw-r--r-- | java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java b/java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java index 96a8c4ae5..46f3fc5ed 100644 --- a/java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java +++ b/java/com/android/voicemail/impl/mail/store/imap/ImapMemoryLiteral.java @@ -26,35 +26,35 @@ import java.io.UnsupportedEncodingException; /** Subclass of {@link ImapString} used for literals backed by an in-memory byte array. */ public class ImapMemoryLiteral extends ImapString { private final String TAG = "ImapMemoryLiteral"; - private byte[] mData; + private byte[] data; /* package */ ImapMemoryLiteral(FixedLengthInputStream in) throws IOException { // We could use ByteArrayOutputStream and IOUtils.copy, but it'd perform an unnecessary // copy.... - mData = new byte[in.getLength()]; + data = new byte[in.getLength()]; int pos = 0; - while (pos < mData.length) { - int read = in.read(mData, pos, mData.length - pos); + while (pos < data.length) { + int read = in.read(data, pos, data.length - pos); if (read < 0) { break; } pos += read; } - if (pos != mData.length) { + if (pos != data.length) { VvmLog.w(TAG, "length mismatch"); } } @Override public void destroy() { - mData = null; + data = null; super.destroy(); } @Override public String getString() { try { - return new String(mData, "US-ASCII"); + return new String(data, "US-ASCII"); } catch (UnsupportedEncodingException e) { VvmLog.e(TAG, "Unsupported encoding: ", e); } @@ -63,11 +63,11 @@ public class ImapMemoryLiteral extends ImapString { @Override public InputStream getAsStream() { - return new ByteArrayInputStream(mData); + return new ByteArrayInputStream(data); } @Override public String toString() { - return String.format("{%d byte literal(memory)}", mData.length); + return String.format("{%d byte literal(memory)}", data.length); } } |