|
Tynamo™-TINI v1.0.4 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.qindesign.mime.Multipart
public class Multipart
Processes multipart messages. This can be used to process files uploaded from an HTML form.
| Nested Class Summary | |
|---|---|
static class |
Multipart.BodyPart
Represents one body part of a multipart body. |
| Constructor Summary | |
|---|---|
Multipart(InputStream in,
String contentType)
Creates a new multipart processor. |
|
| Method Summary | |
|---|---|
static Enumeration |
getParameters(String headerValue)
Returns an Enumeration of the parameters in the given
content type. |
static String |
getType(String headerValue)
Gets the media type portion of the given content type. |
static boolean |
isMultipart(String contentType)
Checks if the given content type is multipart. |
Multipart.BodyPart |
nextBodyPart()
Reads the next body part. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Multipart(InputStream in,
String contentType)
throws IOException
in - an InputStream containing the bodycontentType - the content type of the data, should be a multipart
type
IOException - if there was an I/O error or if the multipart body
is not in the correct format.| Method Detail |
|---|
public Multipart.BodyPart nextBodyPart()
throws IOException
null if there are
none left.
BodyPart object, or null if there
are none left.
IOException - if there was an I/O error or if the body part is
not in the correct format.public static boolean isMultipart(String contentType)
contentType - the content type to check
public static String getType(String headerValue)
headerValue - the value of the Content-Type or Content-Disposition
header
public static Enumeration getParameters(String headerValue)
Enumeration of the parameters in the given
content type. Each enumerated element will be a string array
containing two items. This can also be used to extract the parameters
from the Content-Disposition header.
This method correctly handles quoted strings. The double quotes are not returned, so there is no need to process the parameter values further.
headerValue - the value of the Content-Type or Content-Disposition
header
|
Tynamo™-TINI v1.0.4 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||