public class FileUploadUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
REMOTE_PW |
static String |
REMOTE_USER |
static long |
UPDATE_INTERVAL |
static String |
UPLOAD_INTERVAL_PROPERTY |
static String |
UPLOAD_REMOTE_PW_PROPERTY |
static String |
UPLOAD_REMOTE_USER_PROPERTY |
static String |
UPLOAD_SERVER_PROPERTY |
static String |
UPLOAD_SERVLET |
static String |
UPLOAD_SERVLET_PROPERTY |
| Constructor and Description |
|---|
FileUploadUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
sendFile(Path path,
String remotePath,
String remoteUser,
String remotePw,
String serverPortAddress,
org.ogema.core.application.ApplicationManager am) |
static int |
sendSimpleDirectory(Path path,
String remotePath,
String remoteUser,
String remotePw,
String serverPortAddress,
org.ogema.core.application.ApplicationManager am,
SendFileUntilSuccessListener listener)
we assume the directory has no subdirectories!
|
static int |
upload(Path path,
String remotePath,
String remoteUser,
String remotePw,
String serverPortAddress,
org.ogema.core.application.ApplicationManager am)
path must be relative to current working directory
|
public static final String UPLOAD_SERVER_PROPERTY
public static final String UPLOAD_SERVLET_PROPERTY
public static final String UPLOAD_INTERVAL_PROPERTY
public static final String UPLOAD_REMOTE_USER_PROPERTY
public static final String UPLOAD_REMOTE_PW_PROPERTY
public static final String UPLOAD_SERVLET
public static final long UPDATE_INTERVAL
public static final String REMOTE_USER
public static final String REMOTE_PW
public static int sendSimpleDirectory(Path path, String remotePath, String remoteUser, String remotePw, String serverPortAddress, org.ogema.core.application.ApplicationManager am, SendFileUntilSuccessListener listener)
public static int sendFile(Path path, String remotePath, String remoteUser, String remotePw, String serverPortAddress, org.ogema.core.application.ApplicationManager am)
path - remotePath - remoteUser - remotePw - serverPortAddress - am - public static int upload(Path path, String remotePath, String remoteUser, String remotePw, String serverPortAddress, org.ogema.core.application.ApplicationManager am) throws IOException, KeyManagementException, NoSuchAlgorithmException
path - remotePath - remoteUser - remotePw - serverPortAddress - am - org.apache.http.conn.HttpHostConnectException - when no connection to host is possible.IOExceptionKeyManagementExceptionNoSuchAlgorithmExceptionCopyright © 2019. All rights reserved.