Solved

Ftp

Posted on 2001-06-26
4
214 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
java  and programming certification ? 4 86
JAVA part two 5 58
HSSFWorkbook cannot be resolved error 10 50
JavaScript/Java - Changing an image background color 4 56
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

867 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

21 Experts available now in Live!

Get 1:1 Help Now