|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.mail.EmailAttachment
public abstract class EmailAttachment
Email attachment.
| Field Summary | |
|---|---|
protected java.lang.String |
contentId
|
protected java.lang.String |
name
|
protected int |
size
|
| Constructor Summary | |
|---|---|
protected |
EmailAttachment(java.lang.String name,
java.lang.String contentId)
|
| Method Summary | |
|---|---|
java.lang.String |
getContentId()
Returns content id for inline attachments, may be null. |
abstract javax.activation.DataSource |
getDataSource()
|
java.lang.String |
getName()
Returns attachment name. |
int |
getSize()
Returns size of received attachment, |
boolean |
isInline()
Returns true if it is inline attachment. |
protected void |
setSize(int size)
|
byte[] |
toByteArray()
Returns byte content of the attachment. |
void |
writeToFile(java.io.File destination)
Saves attachment to a file. |
void |
writeToStream(java.io.OutputStream out)
Saves attachment to output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String name
protected final java.lang.String contentId
protected int size
| Constructor Detail |
|---|
protected EmailAttachment(java.lang.String name,
java.lang.String contentId)
| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getContentId()
null.
public boolean isInline()
true if it is inline attachment.
public abstract javax.activation.DataSource getDataSource()
public int getSize()
protected void setSize(int size)
public byte[] toByteArray()
public void writeToFile(java.io.File destination)
public void writeToStream(java.io.OutputStream out)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||