|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.util.protocol.email.AttachmentHolder
public class AttachmentHolder
| Constructor Summary | |
|---|---|
AttachmentHolder(java.lang.String fileName,
java.lang.String content)
Message contents of type "text/plain". |
|
AttachmentHolder(java.lang.String fileName,
java.lang.String contentType,
byte[] content)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
createLiteral(byte[] arr)
Get the raw messages as a string, for tests and for dumping only |
boolean |
equals(AttachmentHolder attachmentHolder)
Does not need to be the same object instance. |
byte[] |
getContent()
|
java.lang.String |
getContentType()
|
java.lang.String |
getFileName()
Returns the fileName, ready to be used as an attachment name in an email |
boolean |
hasExtension(java.lang.String extension)
Checks if we are the given extension type. |
boolean |
hasExtensionFromList(java.lang.String extensionList)
A comma separated list like ".txt,.xml" |
void |
setContent(byte[] content)
|
void |
setContentType(java.lang.String contentType)
|
void |
setFileName(java.lang.String fileName)
|
java.lang.String |
toXml(boolean readable)
|
java.lang.String |
toXml(boolean readable,
boolean dumpAttachmentData)
Dumps message to xml. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentHolder(java.lang.String fileName,
java.lang.String contentType,
byte[] content)
fileName - contentType - content -
public AttachmentHolder(java.lang.String fileName,
java.lang.String content)
fileName - content - | Method Detail |
|---|
public boolean equals(AttachmentHolder attachmentHolder)
attachmentHolder -
public byte[] getContent()
public void setContent(byte[] content)
content - The content to set.public java.lang.String getFileName()
public boolean hasExtension(java.lang.String extension)
extension - For example ".txt"
public boolean hasExtensionFromList(java.lang.String extensionList)
extensionList - "*" matches all
public void setFileName(java.lang.String fileName)
fileName - The fileName to set.public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - The contentType to set.public static final java.lang.String createLiteral(byte[] arr)
public java.lang.String toXml(boolean readable)
public java.lang.String toXml(boolean readable,
boolean dumpAttachmentData)
readable - If true '\0' are replaced by '*'
|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||