Solved

Ftp

Posted on 2001-06-26
4
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:vglaxmi2001
ID: 6227953
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
ID: 6229098
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
ID: 7616584
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
ID: 7639863
PAQ'd and points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

636 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