|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.multipart.Part
com.ning.http.multipart.PartBase
com.ning.http.multipart.StringPart
public class StringPart
This class is an adaptation of the Apache HttpClient implementation
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHARSET
Default charset of string parameters |
static java.lang.String |
DEFAULT_CONTENT_TYPE
Default content encoding of string parameters. |
static java.lang.String |
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of string parameters |
| Fields inherited from class com.ning.http.multipart.Part |
|---|
BOUNDARY, CHARSET, CONTENT_DISPOSITION, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, CRLF, EXTRA, QUOTE |
| Constructor Summary | |
|---|---|
StringPart(java.lang.String name,
java.lang.String value)
Constructor. |
|
StringPart(java.lang.String name,
java.lang.String value,
java.lang.String charset)
Constructor. |
|
| Method Summary | |
|---|---|
protected long |
lengthOfData()
Return the length of the data. |
protected void |
sendData(java.io.OutputStream out)
Writes the data to the given OutputStream. |
void |
setCharSet(java.lang.String charSet)
Sets the character encoding. |
| Methods inherited from class com.ning.http.multipart.PartBase |
|---|
getCharSet, getContentType, getName, getTransferEncoding, setContentType, setName, setTransferEncoding |
| Methods inherited from class com.ning.http.multipart.Part |
|---|
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendDispositionHeader, sendEnd, sendEndOfHeader, sendMessageEnd, sendPart, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_CONTENT_TYPE
public static final java.lang.String DEFAULT_CHARSET
public static final java.lang.String DEFAULT_TRANSFER_ENCODING
| Constructor Detail |
|---|
public StringPart(java.lang.String name,
java.lang.String value,
java.lang.String charset)
name - The name of the partvalue - the string to postcharset - the charset to be used to encode the string, if null
the default is used
public StringPart(java.lang.String name,
java.lang.String value)
name - The name of the partvalue - the string to post| Method Detail |
|---|
protected void sendData(java.io.OutputStream out)
throws java.io.IOException
sendData in class Partout - the OutputStream to write to
java.io.IOException - if there is a write error
protected long lengthOfData()
throws java.io.IOException
lengthOfData in class Partjava.io.IOException - If an IO problem occurspublic void setCharSet(java.lang.String charSet)
PartBase
setCharSet in class PartBasecharSet - the character encoding, or null to exclude the character
encoding header
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||