|
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.MIMEMessage
A MIME encoded message. This is basically a collection of MIMEAttachment objects. This class takes care of the ASCII encoding of the message as a whole, including the segment boundary, etc... It does NOT take care of any headers other than the Content-Type, which it always identifies as "MULTIPART/MIXED". This class can also be used to parse "file upload" information out of HTML forms.
MIMEAttachment
, Serialized FormConstructor Summary | |
MIMEMessage()
Initialize the MIMEMessage. |
Method Summary | |
void |
addAttachment(MIMEAttachment a)
Add an attachment to this message |
java.util.Enumeration |
getAttachments()
Get an enumeration of the attachments to this message. |
java.lang.String |
getBoundary()
Get the boundary between parts of the message. |
java.lang.String |
getContentType()
Get the Content-Type of this message, also includes the boundary. |
static boolean |
isBinaryContent(byte[] data)
Scan the content and decide if it's binary or ASCII data. |
static boolean |
isBinaryContent(byte[] data,
int start,
int len)
Scan the content and decide if it's binary or ASCII data. |
static void |
main(java.lang.String[] args)
|
static MIMEMessage |
parse(byte[] data)
Return a MIMEMessage built from the data. |
static MIMEMessage |
parse(java.io.InputStream s)
Return a MIMEMessage built from the InputStream that points to a MIME message. |
void |
removeAttachment(MIMEAttachment a)
Remove an attachment to this message |
void |
setBoundary(java.lang.String boundary)
Set the boundary between parts of the message. |
java.lang.String |
toString()
Return the encoded message (including all attachments) |
void |
write(java.io.PrintWriter w)
Write this message to the given output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MIMEMessage()
Method Detail |
public java.lang.String getContentType()
public void addAttachment(MIMEAttachment a)
public void removeAttachment(MIMEAttachment a)
public java.util.Enumeration getAttachments()
public java.lang.String getBoundary()
public void setBoundary(java.lang.String boundary)
public java.lang.String toString()
toString
in class java.lang.Object
public void write(java.io.PrintWriter w)
public static MIMEMessage parse(java.io.InputStream s) throws MIMEException
public static MIMEMessage parse(byte[] data) throws MIMEException
public static boolean isBinaryContent(byte[] data)
public static boolean isBinaryContent(byte[] data, int start, int len)
public static void main(java.lang.String[] args)
|
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 |