Methods Summary |
---|
public java.lang.String | getAttachmentType()Returns the attachment's content type.
String contentType;
if ((contentType = part.getContentType()) == null)
return "invalid part";
else
return contentType;
|
public java.lang.String | getContent()Returns the attachment's content (if it is plain text).
if (hasMimeType("text/plain"))
return (String)part.getContent();
else
return "";
|
public java.lang.String | getDescription()Returns the attachment's description.
String description;
if ((description = part.getDescription()) != null)
return description;
else
return "";
|
public java.lang.String | getFilename()Returns the attachment's filename.
String filename;
if ((filename = part.getFileName()) != null)
return filename;
else
return "";
|
public java.lang.String | getNum()Returns the attachment number.
return (Integer.toString(num));
|
public boolean | hasDescription()Method for checking if the attachment has a description.
return (part.getDescription() != null);
|
public boolean | hasFilename()Method for checking if the attachment has a filename.
return (part.getFileName() != null);
|
public boolean | hasMimeType(java.lang.String mimeType)Method for checking if the attachment has the desired mime type.
return part.isMimeType(mimeType);
|
public boolean | isInline()Method for checking the content disposition.
if (part.getDisposition() != null)
return part.getDisposition().equals(Part.INLINE);
else
return true;
|
public void | setPart(int num, javax.mail.Part part)Method for mapping a message part to this AttachmentInfo class.
this.part = part;
this.num = num;
|