public class SimpleMultipartEntity
extends org.apache.http.entity.mime.MultipartEntity
| Constructor and Description |
|---|
SimpleMultipartEntity() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilePart(String name,
File file)
add a file part to the MMP
|
void |
addFilePart(String name,
InputStream is)
add a file part to the MMP, using InputStream
This method writes the contents of the stream to
a temp file and sends it.
|
void |
addFilePart(String name,
Object serializableD1Object)
The DataONE object (serializable datatype) passed in
is serialized as the specified type to file.
|
void |
addFilePart(String name,
Object serializableD1Object,
Class type)
Deprecated.
|
void |
addFilePart(String name,
String value)
This method generates a temp files for sending, containing
the value parameter.
|
void |
addParamPart(String name,
String value)
add a param part to the MMP
|
boolean |
cleanupTempFiles()
calling this method attempts to delete the client-side
temp files from the system.
|
String |
getDescription()
Returns a concise description of the existing file parts, as comma-separated
key-value pairs.
|
protected String |
getLastTempfile() |
public String getDescription()
public void addFilePart(String name, File file)
name - - the name assigned to the file partfile - - the file to be put into the file partpublic void addFilePart(String name, InputStream is) throws IOException
name - - the name assigned to the file partis - - the inputStreamIOExceptionpublic void addFilePart(String name, Object serializableD1Object) throws IOException, MarshallingException
name - serializableD1Object - - the dataone serializable object to addtype - - class of the serializable dataone datatypeIOExceptionMarshallingException@Deprecated public void addFilePart(String name, Object serializableD1Object, Class type) throws IOException, MarshallingException
IOExceptionMarshallingExceptionpublic void addFilePart(String name, String value) throws IOException
name - - the name assigned to the file partvalue - - the String to be passed as a file partIOExceptionpublic void addParamPart(String name, String value)
name - - the name (key) assigned to the param partvalue - - the value associated to the nameprotected String getLastTempfile()
public boolean cleanupTempFiles()
Copyright © 2020. All Rights Reserved.