Modifier and Type | Field and Description |
---|---|
static Charset |
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
|
CHARSET_BYTES, CONTENT_DISPOSITION_BYTES, CONTENT_ID_BYTES, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE_BYTES, CRLF_BYTES, EXTRA_BYTES, FORM_DATA_DISPOSITION_TYPE_BYTES, NAME_BYTES, QUOTE_BYTE
Constructor and Description |
---|
StringPart(String name,
String value) |
StringPart(String name,
String value,
String contentType) |
StringPart(String name,
String value,
String contentType,
Charset charset) |
StringPart(String name,
String value,
String contentType,
Charset charset,
String contentId) |
StringPart(String name,
String value,
String contentType,
Charset charset,
String contentId,
String transferEncoding) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes(byte[] boundary) |
protected long |
getDataLength()
Return the length of the data.
|
String |
getValue() |
protected void |
sendData(OutputStream out)
Writes the data to the given OutputStream.
|
long |
write(WritableByteChannel target,
byte[] boundary) |
getCharset, getContentId, getContentType, getDispositionType, getName, getTransferEncoding, length, setDispositionType, toString, visitContentIdHeader, visitContentTypeHeader, visitDispositionHeader, visitEnd, visitEndOfHeader, visitStart, visitTransferEncodingHeader, write
public static final String DEFAULT_CONTENT_TYPE
public static final Charset DEFAULT_CHARSET
public static final String DEFAULT_TRANSFER_ENCODING
public StringPart(String name, String value, String contentType, Charset charset, String contentId)
protected void sendData(OutputStream out) throws IOException
sendData
in class PartBase
out
- the OutputStream to write toIOException
- if there is a write errorprotected long getDataLength()
getDataLength
in class PartBase
public byte[] getBytes(byte[] boundary) throws IOException
IOException
public long write(WritableByteChannel target, byte[] boundary) throws IOException
IOException
public String getValue()
Copyright © 2014. All Rights Reserved.