|
Protomatter Classes v1.1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.protomatter.util.MIMEAttachment
This class is used in conjunction with the MIMEMessage class to make a multipart MIME message. A MIMEAttachment enacpsulates a single attachment (i.e. an image, a document, etc). Attached binaries are encoded using the Base64 method.
MIMEMessage
, Serialized FormConstructor Summary | |
MIMEAttachment()
Create an empty attachment. |
|
MIMEAttachment(java.lang.String type,
java.lang.String description,
byte[] data)
Create a MIMEAttachment object with the given MIME type and description. |
|
MIMEAttachment(java.lang.String type,
java.lang.String description,
byte[] data,
boolean isBinary)
Create a MIMEAttachment object with the given MIME content type and description. |
|
MIMEAttachment(java.lang.String type,
java.lang.String description,
java.lang.String content)
Create a MIMEAttachment object with the given MIME content type and description. |
Method Summary | |
byte[] |
getContent()
Return the content. |
java.lang.String |
getHeader(java.lang.String headerName)
Get a header value. |
java.util.Enumeration |
getHeaderNames()
Get an Enumeration of the header names. |
java.lang.String |
getSubHeader(java.lang.String name,
java.lang.String sub)
Some headers (such as Content-Disposition) have multiple key="value" pairs associated with them. |
boolean |
isBinary()
Is the content of the attachment ascii or binary? |
void |
removeHeader(java.lang.String headerName)
Remove a header value. |
void |
setBinary(boolean b)
Set the flag to indicate that the content of this attachment is binary. |
void |
setContent(byte[] content)
Set the content of this attachment. |
void |
setContent(java.lang.String content)
Set the content of this attachment. |
void |
setHeader(java.lang.String headerName,
java.lang.String headerVal)
Set a header value. |
void |
setHeaders(java.util.Hashtable headers)
Set the headers. |
java.lang.String |
toString()
Produces a chunk of text, including the encoded attachment object |
void |
write(java.io.PrintWriter w)
Append the content of this attachment to the given StringBuffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MIMEAttachment(java.lang.String type, java.lang.String description, java.lang.String content)
public MIMEAttachment(java.lang.String type, java.lang.String description, byte[] data, boolean isBinary)
public MIMEAttachment(java.lang.String type, java.lang.String description, byte[] data)
public MIMEAttachment()
Method Detail |
public void setHeaders(java.util.Hashtable headers)
public void setBinary(boolean b)
public void setContent(java.lang.String content)
public void setContent(byte[] content)
public void setHeader(java.lang.String headerName, java.lang.String headerVal)
public void removeHeader(java.lang.String headerName)
public java.lang.String getHeader(java.lang.String headerName)
public java.lang.String getSubHeader(java.lang.String name, java.lang.String sub)
public java.lang.String toString()
toString
in class java.lang.Object
public void write(java.io.PrintWriter w)
public byte[] getContent()
public java.util.Enumeration getHeaderNames()
public boolean isBinary()
|
Protomatter Classes v1.1.6 Copyright 1998-2001 Nate Sammons |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protomatter Classes v1.1.6 | http://protomatter.sourceforge.net/1.1.6 |