FTPClient
FTPFileInfo
HTTPClient
HTTPClientLoggingConfig
HTTPRequestPart
Mail
SFTPClient
SFTPFileInfo
WebDAVClient
WebDAVFileInfo
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
This represents a part in a multi-part HTTP POST request.
A part always has a name and value. The value may be a String, Bytes, or the contents of a File.
A character encoding may be specified for any of these, and the content type and a file name may additionally be specified for the Bytes and File types.
Note: when this class is used with sensitive data, be careful in persisting sensitive information.
| Property | Description |
|---|---|
bytesValue: Bytes (read-only) | Get the Bytes value of the part. |
contentType: String (read-only) | Returns the content type of this part. |
encoding: String (read-only) | Get the charset to be used to encode the string. |
fileName: String (read-only) | Get the file name to use when sending a file part. |
fileValue: File (read-only) | Get the file value of the part. |
name: String (read-only) | Get the name of the part. |
stringValue: String (read-only) | Get the string value of the part. |
| Constructor | Description |
|---|---|
| HTTPRequestPart(String, String) | Construct a part representing a simple string name/value pair. |
| HTTPRequestPart(String, String, String) | Construct a part representing a simple string name/value pair. |
| HTTPRequestPart(String, File) | Construct a part representing a name/File pair. |
| HTTPRequestPart(String, Bytes) | Construct a part representing a name/bytes pair. |
| HTTPRequestPart(String, Bytes, String, String, String) | Construct a part representing a name/File pair. |
| HTTPRequestPart(String, File, String, String) | Construct a part representing a name/File pair. |
| HTTPRequestPart(String, File, String, String, String) | Construct a part representing a name/File pair. |
| Method | Description |
|---|---|
| getBytesValue() | Get the Bytes value of the part. |
| getContentType() | Returns the content type of this part. |
| getEncoding() | Get the charset to be used to encode the string. |
| getFileName() | Get the file name to use when sending a file part. |
| getFileValue() | Get the file value of the part. |
| getName() | Get the name of the part. |
| getStringValue() | Get the string value of the part. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
(read-only)Get the Bytes value of the part.
(read-only)Returns the content type of this part.
(read-only)Get the charset to be used to encode the string.
(read-only)Get the file name to use when sending a file part.
(read-only)Get the file value of the part.
(read-only)Get the name of the part.
(read-only)Get the string value of the part.
Construct a part representing a simple string name/value pair. The HTTP message uses "US-ASCII" as the default character set for the part.
Parameters:
Construct a part representing a simple string name/value pair. The HTTP message uses the specified encoding or "US-ASCII" if null is passed for the part.
Parameters:
Construct a part representing a name/File pair. The HTTP message will use "application/octet-stream" as the content type and "ISO-8859-1" as the character set for the part.
Parameters:
Construct a part representing a name/bytes pair. The HTTP message will use "application/octet-stream" as the content type without a character set.
Parameters:
Construct a part representing a name/File pair.
Parameters:
Construct a part representing a name/File pair.
Parameters:
Construct a part representing a name/File pair.
Parameters:
Get the Bytes value of the part.
Returns:
Returns the content type of this part.
Returns:
Get the charset to be used to encode the string.
Returns:
Get the file name to use when sending a file part.
Returns:
Get the file value of the part.
Returns:
Get the name of the part.
Returns:
Get the string value of the part.
Returns: