Lines Matching defs:part

44     private void putPartToMaps(PduPart part) {
45 // Put part to mPartMapByContentId.
46 byte[] contentId = part.getContentId();
48 mPartMapByContentId.put(new String(contentId), part);
51 // Put part to mPartMapByContentLocation.
52 byte[] contentLocation = part.getContentLocation();
55 mPartMapByContentLocation.put(clc, part);
58 // Put part to mPartMapByName.
59 byte[] name = part.getName();
62 mPartMapByName.put(clc, part);
65 // Put part to mPartMapByFileName.
66 byte[] fileName = part.getFilename();
69 mPartMapByFileName.put(clc, part);
74 * Appends the specified part to the end of this body.
76 * @param part part to be appended
78 * @throws NullPointerException when part is null
80 public boolean addPart(PduPart part) {
81 if(null == part) {
85 putPartToMaps(part);
86 return mParts.add(part);
90 * Inserts the specified part at the specified position.
92 * @param index index at which the specified part is to be inserted
93 * @param part part to be inserted
94 * @throws NullPointerException when part is null
96 public void addPart(int index, PduPart part) {
97 if(null == part) {
101 putPartToMaps(part);
102 mParts.add(index, part);
106 * Removes the part at the specified position.
108 * @param index index of the part to return
109 * @return part at the specified index
123 * Get the part at the specified position.
125 * @param index index of the part to return
126 * @return part at the specified index
133 * Get the index of the specified part.
135 * @param part the part object
136 * @return index the index of the first occurrence of the part in this body
138 public int getPartIndex(PduPart part) {
139 return mParts.indexOf(part);
152 * Get pdu part by content id.
155 * @return the pdu part.
162 * Get pdu part by Content-Location. Content-Location of part is
166 * @return the pdu part.
173 * Get pdu part by name.
176 * @return the pdu part.
183 * Get pdu part by filename.
186 * @return the pdu part.