Home » Core Java » apache » commons » net

net

org.apache.commons.net.ftp.ftpclient Example

In this example we are going to elaborate the use of the FTPClient class in the package: org.apache.commons.net.ftp, as the package name says, it is a member of the Apache Commons, and deals with the FTP. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The methods of this class as other classes ...

Read More »

java.net.URLConnection Example

URLConnection class is used for accessing the attributes of a remote resource. It represents a communication link between the URL and the application.This class can be used to read and write data to resource provided by the URL. URLConnection has subclasses HttpURLConnection which has support for HTTP-specific features and JarURLConnection which has support for JAR-specific features. In this example we ...

Read More »

Delete File from FTP Server

This is an example of how to delete a File from an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. Deleting a File from an FTP Server implies that you should: Create a new FTPClient. Use connect() API method to open a connection to the FTP ...

Read More »

Get list of files from FTP Server

In this example we shall show you how to get a list of files from an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. To get a list of files from an FTP Server one should perform the following steps: Create a new FTPClient. Use connect() API ...

Read More »

Establish connection with FTP Server

With this example we are going to demonstrate how to establish a connection with an FTP Server. We are using the org.apache.commons.net.ftp.FTPClient Class that encapsulates all the functionality necessary to store and retrieve files from an FTP server. In short, to establish a connection with an FTP Server you should: Create a new FTPClient. Use connect() API method to open a ...

Read More »

Download file from FTP Server

This is an example of how to download a File from an FTP Server, using the org.apache.commons.net.ftp.FTPClient Class, that encapsulates all the functionality necessary to store and retrieve files from an FTP server. Downloading a File from an FTP Server implies that you should: Create a new FTPClient. Use connect() API method to open a connection to the FTP Server. ...

Read More »

File Upload to FTP Server

In this example we shall show you how to upload a File to an FTP Server, using the org.apache.commons.net.ftp.FTPClient Class, that encapsulates all the functionality necessary to store and retrieve files from an FTP server. To upload a File to an FTP Server one should perform the following steps: Create a new FTPClient. Use connect() API method to open a connection ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns