|
IP*Works! V8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ipworks.MIMEPart
A part of the MIME message.
Each MIME message is split into parts. A message must have at least one part to
be a valid MIME message. The message itself is split into the MessageHeaders and
the Message body. The body is then split into MIME parts by a specified or
generated Boundary . Each part of a MIME message has its own Headers as well.
These headers describe the MIMEPART and its contents.
The decoded data will be held in DecodedString or otherwise saved in a temporary
file given by DecodedFile when the user asks for the value of the respective
field.
If the encoded data is file data, the decoded file(s) will be given in the DecodedFile field. Otherwise, the decoded data will be in the DecodedString field.
When the EncodeToString method is called, the bean will check for each item
in the Parts collection (first the DecodedFile and then the DecodedString )
for the data to encode.
ContentDisposition: Content Disposition for each part.
This value is used in the Content-Disposition header. Typical values include
"form-data", "attachment" etc. The bean fills it out each time
the DecodedFile is changed. Changing the ContentDisposition recalculates the Headers as well.
ContentDispositionAttr: The content disposition's attribute (if any) for each part.
Typical values for ContentDispositionAttr are the names of the
form-variables while creating an HTTP post, values for filenames etc.
Setting the ContentDispositionAttr recalculates the Headers .
ContentId:
Content id for each part.
This value is used in the Content-Id header. The bean fills
it out each time the DecodedFile is changed. Changing the ContentId recalculates the Headers as well.
ContentType:
Content type for each part.
This value is used in the Content-Type header. Typical values include
"image/gif", "text/plain" etc. The bean fills it out each time
the DecodedFile is changed. Changing the ContentType recalculates the Headers as well.
ContentTypeAttr:
The content type attribute, if any, for each part.
Setting this recalculates the Headers as well.
DecodedFile:
The filename with the decoded data.
Accessing the DecodedFile for the first time after calling the DecodeFromString or DecodeFromFile method, directs the bean to
actually decode the part and save the data in a temporary file. The user is responsible
for deleting the temporary file.
Setting a value to DecodedFile directs the component to calculate the
file size and fill out the respective Size .
DecodedString:
It holds the actual content of each part.
The bean decodes the actual part of Message to DecodedString when DecodedString 's value is first queried.
Setting a value to DecodedString fills out the corresponding Size with the string
size if the corresponding DecodedFile is empty.
The bean checks during encoding first DecodedFile :
if it is empty then the bean uses the value of DecodedString .
Encoding:
The actual content encoding type for each part. Encoding determines how to encode the data or how
they were actually encoded in the Message as specified in the Content-Transfer-Encoding header.
Possible values for the Encoding are:
Filename:
The filename attribute specified in the headers of the part.
Changing the value of the corresponding DecodedFile sets automatically the Filename and consequently the Headers .
Headers:
Headers for each MIME part.
The bean fills out Headers each time any of the other corresponding Part-
properties is changed. If additional headers are needed, they should be appended
after all the other corresponding Part- properties are set.
Name:
The name given to a part, such as the filename.
Changing the value of DecodedFile sets automatically the
corresponding Name and consequently the Headers .
PartInputStream: A stream which contains the actual content of each part before the message is encoded.
PartOutputStream:
The bean decodes the actual part of Message when PartOutputStream 's
value is first set, and writes the decoded value to the stream.
Size:
The size of the DecodedFile or DecodedString .
If a non empty value is assigned to DecodedFile , then bean fills out the corresponding Size with the file size or an error occurrs if the file doesn't exist.
If the DecodedFile is empty and a value is assigned to DecodedString , then the corresponding Size will be equal to the string's size.
During decoding, the Size is filled with the size of that part.
Atom,
Atom.MIMEPart| Field Summary | |
static int |
pe7Bit
|
static int |
pe8Bit
|
static int |
peBase64
|
static int |
peBinary
|
static int |
peQuotedPrintable
|
| Constructor Summary | |
MIMEPart()
|
|
MIMEPart(byte[] decodedString)
|
|
MIMEPart(java.io.InputStream partInputStream)
|
|
MIMEPart(java.lang.String decodedFile)
|
|
| Method Summary | |
java.lang.String |
getContentDisposition()
|
java.lang.String |
getContentDispositionAttr()
|
java.lang.String |
getContentId()
|
java.lang.String |
getContentType()
|
java.lang.String |
getContentTypeAttr()
|
java.lang.String |
getDecodedFile()
|
byte[] |
getDecodedString()
|
int |
getEncoding()
|
java.lang.String |
getFilename()
|
java.lang.String |
getHeaders()
|
java.lang.String |
getName()
|
java.io.InputStream |
getPartInputStream()
|
java.io.OutputStream |
getPartOutputStream()
|
int |
getSize()
|
void |
setContentDisposition(java.lang.String value)
|
void |
setContentDispositionAttr(java.lang.String value)
|
void |
setContentId(java.lang.String value)
|
void |
setContentType(java.lang.String value)
|
void |
setContentTypeAttr(java.lang.String value)
|
void |
setDecodedFile(java.lang.String value)
|
void |
setDecodedString(byte[] value)
|
void |
setEncoding(int value)
|
void |
setFilename(java.lang.String value)
|
void |
setHeaders(java.lang.String value)
|
void |
setName(java.lang.String value)
|
void |
setPartInputStream(java.io.InputStream value)
|
void |
setPartOutputStream(java.io.OutputStream value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int pe7Bit
public static final int peQuotedPrintable
public static final int peBase64
public static final int pe8Bit
public static final int peBinary
| Constructor Detail |
public MIMEPart()
public MIMEPart(java.lang.String decodedFile)
public MIMEPart(byte[] decodedString)
public MIMEPart(java.io.InputStream partInputStream)
| Method Detail |
public java.lang.String getContentDisposition()
public void setContentDisposition(java.lang.String value)
public java.lang.String getContentDispositionAttr()
public void setContentDispositionAttr(java.lang.String value)
public java.lang.String getContentId()
public void setContentId(java.lang.String value)
public java.lang.String getContentType()
public void setContentType(java.lang.String value)
public java.lang.String getContentTypeAttr()
public void setContentTypeAttr(java.lang.String value)
public java.lang.String getDecodedFile()
public void setDecodedFile(java.lang.String value)
public byte[] getDecodedString()
public void setDecodedString(byte[] value)
public int getEncoding()
public void setEncoding(int value)
public java.lang.String getFilename()
public void setFilename(java.lang.String value)
public java.lang.String getHeaders()
public void setHeaders(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.io.InputStream getPartInputStream()
public void setPartInputStream(java.io.InputStream value)
public java.io.OutputStream getPartOutputStream()
public void setPartOutputStream(java.io.OutputStream value)
public int getSize()
|
IP*Works! V8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||