|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.objectweb.jac.lib.Attachment
This class represents a file attachment. The data field is the content of the file.
| Constructor Summary | |
Attachment(byte[] data,
String mimeType,
String name)
Creates a new Attachement object. |
|
| Method Summary | |
byte[] |
getData()
Returns the content of the attachment. |
String |
getMimeType()
|
String |
getName()
|
static Object |
getType(FieldItem field,
Attachment attachment)
|
void |
guessMimeType()
|
void |
setData(byte[] data)
Set the content of the file |
void |
setMimeType(String mimeType)
Sets the mime type of the file. |
void |
setName(String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Attachment(byte[] data,
String mimeType,
String name)
| Method Detail |
public void guessMimeType()
public byte[] getData()
setData(byte[])public void setData(byte[] data)
data - the content of the filegetData()public String getMimeType()
setMimeType(String)public void setMimeType(String mimeType)
mimeType - the mime type of the file.getMimeType()public String getName()
setName(String)public void setName(String name)
name - the name of the filegetName()
public static Object getType(FieldItem field,
Attachment attachment)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||