Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

sun.net.ftp.FtpClient;

843811Apr 13 2005 — edited Apr 15 2005
i got a simple question,

i used the sun.net.* package to realize a ftp connection, but

the "get" statement takes such a long time, but why, can anyone tell me the reason.

here a part of my code:

public class FTP2 extends FtpClient {

public FTP2(int pflag,String host,String pfad) throws IOException{

int lastSlash = pfad.lastIndexOf('/');
int schalter=0;
String filename = path.substring(lastSlash+1);
String dir = path.substring(0,lastSlash);
FtpClient client = new FtpClient(host);
client.login(user,pass);
client.ascii();
client.cd(dir);
InputStream is;
BufferedInputStream bis;
OutputStream os;
BufferedOutputStream bos;

is= client.get("test.txt");
bis = new BufferedInputStream(is);
os = new FileOutputStream("FTP-Verbindung.txt");
bos = new BufferedOutputStream (os);

and so on....

Thanks for your help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2005
Added on Apr 13 2005
1 comment
594 views