Adds a Part to the multipart. The BodyPart is appended to the list of existing Parts. @param part The Part to be appended @exception IllegalWriteException if the underlying implementation does not support modification of existing values @exception MessagingException for other failures
(BodyPart part)
| 188 | * @exception MessagingException for other failures |
| 189 | */ |
| 190 | public synchronized void addBodyPart(BodyPart part) |
| 191 | throws MessagingException { |
| 192 | if (parts == null) |
| 193 | parts = new Vector<>(); |
| 194 | |
| 195 | parts.addElement(part); |
| 196 | part.setParent(this); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Adds a BodyPart at position <code>index</code>. |
no test coverage detected