Solved

Ftp

Posted on 2001-06-26
4
213 Views
Last Modified: 2010-03-31
I am building an FTP Client Program using Java. It is working fine for text files. But for other documents it is not downloading properly.. Though ive set the type to I or A accordingly. I got this source from some site. It basically uses LineNumberReader for reading from the input stream.
I tried DataInputStream, it is very slow and once again not downloading the whole file.
Does anybody have any suggestions as to what kind of io streams that can be used..
Any help will be welcome...
Thank you
vg
0
Comment
Question by:vglaxmi2001
  • 2
4 Comments
 

Author Comment

by:vglaxmi2001
Comment Utility
Ok. I have pasted the download section of my code here...
Hope somebody can help.


int data = 0;
FileWriter f = new FileWriter(file);
InputStreamReader BIN = new InputStreamReader( ds.getInputStream() );
DIN  = new LineNumberReader(BIN);
while((data = DIN.read()) != -1){
    f.write(data);
    f.flush();
}
f.close();


Thanks and regards
vg
0
 

Author Comment

by:vglaxmi2001
Comment Utility
Well I have used plain InputStream instead of DataInputStream and it works fine with the Ftp server running on my system, but not with a remote server!!!!!!
The downloaded files are bigger now!!!!!!!
SOS.. Somebody Please help :-(
0
 
LVL 5

Expert Comment

by:vemul
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be deleted and points refunded
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQ'd and points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now