Questions tagged [apache-commons-net]

Apache Commons Net™ library implements the client side of many basic Internet protocols.

Protocols supported:

FTP/FTPS
NNTP
SMTP(S)
POP3(S)
IMAP(S)
Telnet
TFTP
Finger
Whois
rexec/rcmd/rlogin
Time (rdate) and Daytime
Echo
Discard
NTP/SNTP

Refer to https://commons.apache.org/proper/commons-net/ for additional information.

415 questions
0
votes
2 answers

Android FTP download pause/resume

I'm working on an Android project that requires FTP download to be paused/resumed. Here is the code I use for FTP connection: ftpClient.setConnectTimeout(25000); ftpClient.login("login",…
android.dev
  • 26
  • 1
  • 7
0
votes
2 answers

How can i read a file in a ftp server using a servlet and then send this as a downloadable file to the user?

I have developed a servlet that offers some services. I am using apache-commons-net FTPClient to log into a ftp server and read a file. I want to make this file downloadle (aka send it to the outputstream maybe?) , but the only ways of reading a…
SGj
  • 21
  • 5
0
votes
1 answer

Set file path on FTPClient

i'm new to java programming and am using Apache commons net ftp to upload text files to my ftp server. however, it seems that i can only upload the files on the same directory as my program .. when i set the file path to something like that :…
0
votes
4 answers

How do I check if a remote directory exists in FTP server?

I am trying to check if a remote directory exists in FTP server by specifying a path but my code failed to check when I provide a valid directory name. I want to check if the remote directory is valid and it is not a file. Here is my code: public…
ssark
  • 9
  • 1
  • 4
0
votes
1 answer

url link for downloading apache commons-net library

I want to get the date and time from NTP server and i'm unsuccessful to download the library. I downloaded the files from this link but non of the file seems to be a library. https://commons.apache.org/proper/commons-net/download_net.cgi I also…
Andrain
  • 872
  • 1
  • 16
  • 43
0
votes
1 answer

Enumerating FTPFile from FTP using ZipFile

My usual approach without an FTP to read ZipFiles was the following: private void getLogFromZip(File logZip){ ZipFile zf = new ZipFile(logZip); Enumeration entries = zf.entries(); while (entries.hasMoreElements()) { ZipEntry ze =…
Setup
  • 330
  • 2
  • 21
0
votes
1 answer

FTP connection without proxy

I have a system, where we were sending files by FTP transfer through Proxy. Now i need to make a change to send the files with or without Proxy. I tried just creating an FTPClient connection without host and port values and also without user id and…
Sonu
  • 95
  • 1
  • 9
0
votes
2 answers

How to set time for a timestamp in FTPClient

I have a file on a server and I want to modify its timestamp. It seems the following line is for this purpose: ftpClient.mlistFile("file path").getTimestamp().setTime(date); But it does not change the date at all. Here is the full code: String…
Dan
  • 577
  • 1
  • 12
  • 38
0
votes
1 answer

Commons-Net FTP client won't give list of files

I have this small ftp java code using which I am trying to access the files in my ubuntu machine in vmware's directory. But I keep getting this error: Current directory is /home/username/Documents Exception in thread "main"…
user2438113
  • 27
  • 1
  • 9
0
votes
0 answers

FTP file access - java

I have written a simple program that access FTP file details in java package MyFTP; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import…
theRoot
  • 571
  • 10
  • 33
0
votes
2 answers

why every directory in FTP list has a "dot" item

I am making a JTree that loads files and folder of a FTP Server, using (Apache Commons). I use this method to load files of a specific directory: FTPFile[] innerFiles = ftp.listFiles(); I noticed that for any directory, innerFiles [0] is . and…
Dan
  • 577
  • 1
  • 12
  • 38
0
votes
1 answer

FTPClient unable to parse LIST response from Apache FTPServer

While trying to perform a listFiles() command using Apache Commons Net 3.3 FTPSClient against an Mina's Apache FTP Server parsing of the listing fails. I've done some debugging and the entries attribute on FTPListParseEngine after reading the server…
Fer Troya
  • 25
  • 6
0
votes
1 answer

Java Ftp list directory then read text file one by one,but the input stream is null

Did a test,using java to read ftp file,the tools is apache-common-net ftp.I try to read one file,it's ok,but when I read multiple files in a directory,the InputStream(ftpClient.retrieveFileStream) is null. Can someone help please,thanks. private…
Neal
  • 1
  • 1
0
votes
1 answer

Connection timeout occurs while connecting through telnet

I am writing a telnetclient example using apache-commons-net.2.0.jar to connect to a target using telnet protocol. There is no problem with the jar it establishes the connection with the host if the host is up and running. If i reboot the system and…
Shriram
  • 4,343
  • 8
  • 37
  • 64
0
votes
1 answer

Creating a Pool of Objects with Java

Awhile ago I created a program that created socket connections and funneled their input to a single telnet connection to our legacy server. The goal of the project is to create a front end for the legacy database and eventually move to a modern…