public class NetUtils extends Object
Constructor and Description |
---|
NetUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
checkForFile(org.apache.commons.net.ftp.FTPClient f,
String seekFile)
determine if a file exists on the remote server.
|
static org.apache.commons.net.ftp.FTPClient |
connect(int mode,
String host,
String loginName,
String password)
Convenient method to get a FTP connection.
|
static boolean |
ftpDownloadFile(org.apache.commons.net.ftp.FTPClient f,
String seekFile,
File outputFile,
boolean force) |
static boolean |
ftpDownloadFile(org.apache.commons.net.ftp.FTPClient f,
String seekFile,
String outputFileName,
boolean force) |
static long |
ftpFileSize(org.apache.commons.net.ftp.FTPClient f,
String seekFile)
Get the size of a remote file.
|
public static long checkForFile(org.apache.commons.net.ftp.FTPClient f, String seekFile) throws IOException
f
- seekFile
- FileNotFoundException
- if the file does not exist.IOException
- on other IO errors.public static org.apache.commons.net.ftp.FTPClient connect(int mode, String host, String loginName, String password) throws SocketException, IOException
host
- login
- password
- mode
- SocketException
IOException
public static boolean ftpDownloadFile(org.apache.commons.net.ftp.FTPClient f, String seekFile, File outputFile, boolean force) throws IOException
f
- seekFile
- outputFile
- force
- IOException
public static boolean ftpDownloadFile(org.apache.commons.net.ftp.FTPClient f, String seekFile, String outputFileName, boolean force) throws IOException, FileNotFoundException
f
- seekFile
- outputFileName
- force
- IOException
FileNotFoundException
public static long ftpFileSize(org.apache.commons.net.ftp.FTPClient f, String seekFile) throws IOException
f
- FTPClientseekFile
- IOException
Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.