Remove the specified part from the multipart message. Shifts all the parts after the removed part down one. @param part The part to remove @return true if part removed, false otherwise @exception MessagingException if no such Part exists @exception IllegalWriteException if the underlying imple
(BodyPart part)
| 146 | * of existing values |
| 147 | */ |
| 148 | public synchronized boolean removeBodyPart(BodyPart part) |
| 149 | throws MessagingException { |
| 150 | if (parts == null) |
| 151 | throw new MessagingException("No such body part"); |
| 152 | |
| 153 | boolean ret = parts.removeElement(part); |
| 154 | part.setParent(null); |
| 155 | return ret; |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Remove the part at specified location (starting from 0). |
no test coverage detected