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/MimeHeader.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/voicemail/impl/mail/internet/MimeHeader.java')
-rw-r--r-- | java/com/android/voicemail/impl/mail/internet/MimeHeader.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/java/com/android/voicemail/impl/mail/internet/MimeHeader.java b/java/com/android/voicemail/impl/mail/internet/MimeHeader.java index 8f0817650..00a9eccf2 100644 --- a/java/com/android/voicemail/impl/mail/internet/MimeHeader.java +++ b/java/com/android/voicemail/impl/mail/internet/MimeHeader.java @@ -45,10 +45,10 @@ public class MimeHeader { HEADER_ANDROID_ATTACHMENT_STORE_DATA }; - protected final ArrayList<Field> mFields = new ArrayList<Field>(); + protected final ArrayList<Field> fields = new ArrayList<Field>(); public void clear() { - mFields.clear(); + fields.clear(); } public String getFirstHeader(String name) throws MessagingException { @@ -60,7 +60,7 @@ public class MimeHeader { } public void addHeader(String name, String value) throws MessagingException { - mFields.add(new Field(name, value)); + fields.add(new Field(name, value)); } public void setHeader(String name, String value) throws MessagingException { @@ -73,7 +73,7 @@ public class MimeHeader { public String[] getHeader(String name) throws MessagingException { ArrayList<String> values = new ArrayList<String>(); - for (Field field : mFields) { + for (Field field : fields) { if (field.name.equalsIgnoreCase(name)) { values.add(field.value); } @@ -86,12 +86,12 @@ public class MimeHeader { public void removeHeader(String name) throws MessagingException { ArrayList<Field> removeFields = new ArrayList<Field>(); - for (Field field : mFields) { + for (Field field : fields) { if (field.name.equalsIgnoreCase(name)) { removeFields.add(field); } } - mFields.removeAll(removeFields); + fields.removeAll(removeFields); } /** @@ -101,11 +101,11 @@ public class MimeHeader { * empty */ public String writeToString() { - if (mFields.size() == 0) { + if (fields.size() == 0) { return null; } StringBuilder builder = new StringBuilder(); - for (Field field : mFields) { + for (Field field : fields) { if (!arrayContains(WRITE_OMIT_FIELDS, field.name)) { builder.append(field.name + ": " + field.value + "\r\n"); } @@ -115,7 +115,7 @@ public class MimeHeader { public void writeTo(OutputStream out) throws IOException, MessagingException { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024); - for (Field field : mFields) { + for (Field field : fields) { if (!arrayContains(WRITE_OMIT_FIELDS, field.name)) { writer.write(field.name + ": " + field.value + "\r\n"); } @@ -140,7 +140,7 @@ public class MimeHeader { @Override public String toString() { - return (mFields == null) ? null : mFields.toString(); + return (fields == null) ? null : fields.toString(); } public static final boolean arrayContains(Object[] a, Object o) { |