|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Part
The Part
object is used to represent a part within
a request message. Typically a part represents either a text
parameter or a file, with associated headers. The contents of
the part can be acquire as an InputStream
or as a
string encoded in the default HTTP encoding ISO-8859-1 or in
the encoding specified with the Content-Type header.
Form
Method Summary | |
---|---|
java.lang.String |
getContent()
This is used to acquire the content of the part as a string. |
ContentType |
getContentType()
This is used to acquire the content type for this part. |
java.lang.String |
getFileName()
This method is used to acquire the file name of the part. |
java.lang.String |
getHeader(java.lang.String name)
This is used to acquire the header value for the specified header name. |
java.io.InputStream |
getInputStream()
This is used to acquire an InputStream for the
part. |
java.lang.String |
getName()
This method is used to acquire the name of the part. |
boolean |
isFile()
This method is used to determine the type of a part. |
Method Detail |
---|
boolean isFile()
java.lang.String getName()
java.lang.String getFileName()
java.lang.String getHeader(java.lang.String name)
name
- the name of the header to get the value for
java.lang.String getContent() throws java.io.IOException
java.io.IOException
- thrown if the content can not be createdjava.io.InputStream getInputStream() throws java.io.IOException
InputStream
for the
part. Acquiring the stream allows the content of the part to
be consumed by reading the stream. Each invocation of this
method will produce a new stream starting from the first byte.
java.io.IOException
- thrown if the stream can not be createdContentType getContentType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |