Package htsjdk.samtools.util.ftp
Class FTPClient
- java.lang.Object
-
- htsjdk.samtools.util.ftp.FTPClient
-
public class FTPClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
READ_TIMEOUT
-
Constructor Summary
Constructors Constructor Description FTPClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FTPReply
binary()
void
closeDataStream()
FTPReply
connect(String host)
Connects to the given FTP host on the default port.void
disconnect()
Disconnects from the host to which we are currently connected.FTPReply
executeCommand(String command)
Executes the given FTP command on our current connection, returning the three digit response code from the server.InputStream
getDataStream()
FTPReply
getReply()
FTPReply
login(String username, String password)
Wrapper for the commandsuser [username]
andpass [password]
.FTPReply
pasv()
FTPReply
quit()
FTPReply
retr(String file)
void
setRestPosition(long position)
FTPReply
size(String file)
Return the size of the remote file
-
-
-
Method Detail
-
connect
public FTPReply connect(String host) throws IOException
Connects to the given FTP host on the default port.- Throws:
IOException
-
executeCommand
public FTPReply executeCommand(String command) throws IOException
Executes the given FTP command on our current connection, returning the three digit response code from the server. This method only works for commands that do not require an additional data port.- Throws:
IOException
-
login
public FTPReply login(String username, String password) throws IOException
Wrapper for the commandsuser [username]
andpass [password]
.- Throws:
IOException
-
quit
public FTPReply quit() throws IOException
- Throws:
IOException
-
binary
public FTPReply binary() throws IOException
- Throws:
IOException
-
pasv
public FTPReply pasv() throws IOException
- Throws:
IOException
-
setRestPosition
public void setRestPosition(long position)
-
retr
public FTPReply retr(String file) throws IOException
- Throws:
IOException
-
getReply
public FTPReply getReply() throws IOException
- Throws:
IOException
-
size
public FTPReply size(String file) throws IOException
Return the size of the remote file- Parameters:
file
-- Returns:
- Throws:
IOException
-
getDataStream
public InputStream getDataStream() throws IOException
- Throws:
IOException
-
closeDataStream
public void closeDataStream() throws IOException
- Throws:
IOException
-
disconnect
public void disconnect()
Disconnects from the host to which we are currently connected.
-
-