| Modifier and Type | Field and Description | 
|---|---|
static String | 
DEFAULT_CHARSET
Default charset of string parameters 
 | 
static String | 
DEFAULT_CONTENT_TYPE
Default content encoding of string parameters. 
 | 
static String | 
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of string parameters 
 | 
BOUNDARY, CHARSET, CONTENT_DISPOSITION, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, CRLF, EXTRA, QUOTE| Constructor and Description | 
|---|
StringPart(String name,
          String value)
Constructor. 
 | 
StringPart(String name,
          String value,
          String charset)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected long | 
lengthOfData()
Return the length of the data. 
 | 
protected void | 
sendData(OutputStream out)
Writes the data to the given OutputStream. 
 | 
void | 
setCharSet(String charSet)
Sets the character encoding. 
 | 
getCharSet, getContentType, getName, getTransferEncoding, setContentType, setName, setTransferEncodinggetBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, length, send, sendContentTypeHeader, sendDispositionHeader, sendEnd, sendEndOfHeader, sendMessageEnd, sendPart, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toStringpublic static final String DEFAULT_CONTENT_TYPE
public static final String DEFAULT_CHARSET
public static final String DEFAULT_TRANSFER_ENCODING
public StringPart(String name, String value, 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 usedprotected void sendData(OutputStream out) throws IOException
sendData in class Partout - the OutputStream to write toIOException - if there is a write errorprotected long lengthOfData()
                     throws IOException
lengthOfData in class PartIOException - If an IO problem occurspublic void setCharSet(String charSet)
PartBasesetCharSet in class PartBasecharSet - the character encoding, or null to exclude the character
 encoding headerCopyright © 2015. All rights reserved.