public class Attachment extends Object
| Constructor and Description |
|---|
Attachment(String name,
String type,
String encoding,
File data)Creates a new Attachment. |
| Modifier and Type | Method and Description |
|---|---|
void | deleteData()Delete the data file |
boolean | equals(Object o)Compares this attachment to another for equality. |
String | getContentType()Returns the content type. |
InputStream | getData()Returns an input stream for reading the attachment data. |
String | getFileName()Returns the file name. |
String | getPath()Returns the absolute path to the data file. |
long | getSize()The unencoded size |
String | getTransferEncoding()Returns the transfer encoding. |
int | hashCode()Returns a hash code based on the file name and data file. |
public void deleteData()
public boolean equals(Object o)
public String getContentType()
public InputStream getData() throws IOException
IOException - if the file cannot be opened for readingpublic String getFileName()
public String getPath()
public long getSize()
public String getTransferEncoding()