com.asprise.util.jtwain.web
Class FileUploader
java.lang.Object
com.asprise.util.jtwain.web.FileUploader
- public class FileUploader
- extends Object
File uploading utility.
FileUploader
public FileUploader()
upload
public void upload(String url,
String parameterName,
File file,
Properties extraParams)
throws IOException
- Uploads a file with specified parameter name and optional extra parameters to a given URL.
- Parameters:
url - the target URLparameterName - the parameter name for the given filefile - file to be uploadedextraParams - additional parameters in a Properties. Set to null to indicate no extra params.
- Throws:
IOException
upload
public void upload(String targetURL,
String parameterName,
String fileName,
File file,
Properties extraParams)
throws IOException
- Uploads a file with specified parameter name and optional extra parameters to a given URL.
- Parameters:
parameterName - the parameter name for the given filefileName - file name to be changed to. set to null to use original file name.file - file to be uploadedextraParams - additional parameters in a Properties. Set to null to indicate no extra params.
- Throws:
IOException
getProxyHost
public String getProxyHost()
- Returns:
getProxyPort
public int getProxyPort()
- Returns:
setProxyHost
public void setProxyHost(String string)
- Parameters:
string -
setProxyPort
public void setProxyPort(int i)
- Parameters:
i -