|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.api.net.DataParameter
public final class DataParameter
Holds the details of a single data parameter sent in the body of POST requests. Supports plain key-value pairs and file uploads
| Constructor Summary | |
|---|---|
DataParameter(String name,
String value)
Creates a new data parameter |
|
DataParameter(String name,
String filename,
FileProvider fileToUpload)
Creates a new upload parameter to be sent on the body of a POST request. |
|
DataParameter(String name,
String filename,
FileProvider fileToUpload,
String contentType)
Creates a new upload parameter to be sent on the body of a POST request. |
|
DataParameter(String name,
String filename,
InputStream uploadStream)
Creates a new upload parameter to be sent on the body of a POST request. |
|
DataParameter(String name,
String filename,
InputStream uploadStream,
String contentType)
Creates a new upload parameter to be sent on the body of a POST request. |
|
DataParameter(String name,
String filename,
ResourceProvider<InputStream> uploadStream)
Creates a new upload parameter to be sent on the body of a POST request. |
|
DataParameter(String name,
String filename,
ResourceProvider<InputStream> uploadStream,
String contentType)
Creates a new upload parameter to be sent on the body of a POST request. |
|
| Method Summary | |
|---|---|
DataParameter |
clone()
|
boolean |
equals(Object o)
|
String |
getContentType()
Get the current Content Type, or null if not set. |
String |
getName()
Returns the name of this data parameter |
ResourceProvider<InputStream> |
getUploadStream()
Returns the upload stream provider that produces an InputStream
of the data to be uploaded when called |
String |
getValue()
Returns the plain String value associated with this data parameter |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataParameter(String name,
String value)
name - the data parameter namevalue - the value associated with the given data parameter
public DataParameter(String name,
String filename,
FileProvider fileToUpload)
name - the name of the data parameterfilename - the name of the file being uploadedfileToUpload - the file to be uploaded
public DataParameter(String name,
String filename,
InputStream uploadStream)
name - the name of the data parameterfilename - the name of the file being uploadeduploadStream - the InputStream with the contents to be uploaded
public DataParameter(String name,
String filename,
ResourceProvider<InputStream> uploadStream)
name - the name of the data parameterfilename - the name of the file being uploadeduploadStream - a callback provider that returns an InputStream with the contents to be uploaded
public DataParameter(String name,
String filename,
FileProvider fileToUpload,
String contentType)
name - the name of the data parameterfilename - the name of the file being uploadedfileToUpload - the file to be uploadedcontentType - the Content Type header used in the MIME body when uploading files.
Defaults to application/octet-stream.
public DataParameter(String name,
String filename,
InputStream uploadStream,
String contentType)
name - the name of the data parameterfilename - the name of the file being uploadeduploadStream - the InputStream with the contents to be uploadedcontentType - the Content Type header used in the MIME body when uploading files.
Defaults to application/octet-stream.
public DataParameter(String name,
String filename,
ResourceProvider<InputStream> uploadStream,
String contentType)
name - the name of the data parameterfilename - the name of the file being uploadeduploadStream - a callback provider that returns an InputStream with the contents to be uploadedcontentType - the Content Type header used in the MIME body when uploading files.
Defaults to application/octet-stream.| Method Detail |
|---|
public final String getName()
public final String getValue()
String value associated with this data parameter
public final ResourceProvider<InputStream> getUploadStream()
InputStream
of the data to be uploaded when called
public String toString()
toString in class Objectpublic final String getContentType()
null if not set.
public final DataParameter clone()
clone in class Objectpublic final boolean equals(Object o)
equals in class Objectpublic final int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||