|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.net.mail.Email.Attachment
public static class Email.Attachment
Attachment represents an attachment to an email.
Attachment requires the javax.activation package
if the method getContentType() is called and the
type has not been explicitly set before.
| Constructor Summary | |
|---|---|
Email.Attachment(String fileName,
byte[] content,
String type)
|
|
| Method Summary | |
|---|---|
byte[] |
getContent()
|
String |
getContentType()
if the content has not been explicitly set (or if the attachment was instanciated through a File object), this method call requires the javax.activation package. |
InputStream |
getInputStream()
|
String |
getName()
|
OutputStream |
getOutputStream()
always throws IOException; functionality not supported |
MyFile |
saveToDir(File dir)
the name of the attachment will be used as the file name |
void |
saveToFile(File file)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Email.Attachment(String fileName,
byte[] content,
String type)
| Method Detail |
|---|
public String getName()
getName in interface javax.activation.DataSourcepublic byte[] getContent()
public String getContentType()
getContentType in interface javax.activation.DataSource
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface javax.activation.DataSourceIOException
public InputStream getInputStream()
throws IOException
getInputStream in interface javax.activation.DataSourceIOException
public MyFile saveToDir(File dir)
throws IOException
IOException
public void saveToFile(File file)
throws IOException
IOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||