/** * Adds a file attachment to the collection. * * @param name the name * @param content accepts byte byte arrays representing the content of the attachment. * @return FileAttachment */ public FileAttachment addFileAttachment(String name, byte[] content) { FileAttachment fileAttachment = new FileAttachment(this.owner); fileAttachment.setName(name); fileAttachment.setContent(content); this.internalAdd(fileAttachment); return fileAttachment; }