jodd.mail.att
Class FileAttachment

java.lang.Object
  extended by jodd.mail.EmailAttachment
      extended by jodd.mail.att.FileAttachment

public class FileAttachment
extends EmailAttachment

File email attachment. Content type is not set by user, but by javax.mail framework.


Field Summary
protected  java.io.File file
           
 
Fields inherited from class jodd.mail.EmailAttachment
contentId, name, size, targetMessage
 
Constructor Summary
FileAttachment(java.io.File file, java.lang.String name, java.lang.String contentId)
           
 
Method Summary
 javax.activation.DataSource getDataSource()
          Returns DataSource implementation, depending of attachment source.
 java.io.File getFile()
          Returns attached file.
 
Methods inherited from class jodd.mail.EmailAttachment
attachment, getContentId, getName, getSize, isEmbeddedInto, isInline, setEmbeddedMessage, setSize, toByteArray, writeToFile, writeToStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected final java.io.File file
Constructor Detail

FileAttachment

public FileAttachment(java.io.File file,
                      java.lang.String name,
                      java.lang.String contentId)
Method Detail

getFile

public java.io.File getFile()
Returns attached file.


getDataSource

public javax.activation.DataSource getDataSource()
Description copied from class: EmailAttachment
Returns DataSource implementation, depending of attachment source.

Specified by:
getDataSource in class EmailAttachment


Copyright © 2003-2013 Jodd Team