Hızlı Konu Açma

Hızlı Konu Açmak için tıklayınız.

Son Mesajlar

Konulardaki Son Mesajlar

Reklam

Forumda Reklam Vermek İçin Bize Ulaşın

FTP İstemcisi

BlackKey

Üye
Fenerbahçe
Kayıtlı Üye
Katılım
12 Eylül 2014
Mesajlar
167
Tepkime puanı
0
Puanları
0
Kod:
[COLOR=#B5B5B5][FONT=tahoma]import java.io.*; [/FONT][/COLOR]import java.net.*; 
import java.util.*; 

public class TestFTP 
{ 

public static **** main(String args[]) 
{ 
try { 
SimpleFTP ftp = new SimpleFTP(); 

// Connect to an FTP server on port 21. 
System.out.println ("connecting..."); 
ftp.connect("mail.baskent.edu.tr", 21, "kullanycy_ad", "sifre"); 

// Set binary mode. 
ftp.bin(); 

// Change to a new working directory on the FTP server. 
ftp.cwd("web"); 

// Upload some files. 
ftp.stor(new File("webcam.jpg")); 
ftp.stor(new File("comicbot-latest.png")); 
// You can also upload from an InputStream, e.g. 
//ftp.stor(new FileInputStream(new File("test.png")), "test.png"); 
//ftp.stor(someSocket.getInputStream(), "blah.dat"); 

// Quit from the FTP server. 
ftp.disconnect(); 

} 
catch (IOException e) { 
// Jibble. 
} 

} 
 [COLOR=#B5B5B5][FONT=tahoma]}[/FONT][/COLOR]
 

Users Who Are Viewing This Konu (Users: 0, Guests: 1)

Üst