FTP İstemcisi

DrogbA

Forum Üyesi
Katılım
27 Ara 2020
Mesajlar
3,440
Tepkime puanı
0
Puanları
36
Kod:
import java.io.*; 
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. 
} 

} 

}
 

Nutella

Bayan Üye
Özel Üye
Katılım
2 Ocak 2021
Mesajlar
3,559
Tepkime puanı
0
Puanları
36
Cinsiyet
  1. Bayan
Takım
Galatasaray
Paylaşım için teşekkürler.
 
metal işleme
Üst