• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi Please Help me

 
Jitendra Nayak
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

1. am using Apche comms .net api to tansfer single image file(tif).

2.port 21 only opened in wins Nt server.

3.manually i can transfer the images thrg FTP.

4.please thr API (binary mode and Ascii am transferring images).

am not able to see images.(inthe path)

is it possible to use port 22 (client res ask me to use only 22)

please what are info i should consider while transfer image to FTP.

what info i should collect from sys/net admin abt server?




code:
=====
FTPClient ftp = new FTPClient();
ftp.connect( server );
ftp.setDefaultPort(FTP.DEFAULT_PORT);//ftp.port
int gg = ftp.getDefaultPort();
System.out.println("The port number id ="+gg);

ftp.login( username, password);

System.out.println("Connected to " + server + ".");
int reply = ftp.getReplyCode();
System.out.print(ftp.getReplyString()+"FROM TEXT FTP CODE="+reply);

if (!FTPReply.isPositiveCompletion(reply))
{
ftp.disconnect();
System.err.println("FTP server refused connection.");
System.exit(1);
}

ftp.setFileType(FTP.BINARY_FILE_TYPE);
ftp.changeWorkingDirectory(desFolder);

InputStream input;

input = new FileInputStream(srcFolder);
System.out.println("The value of = "+input.toString());
ftp.storeFile(desFolder,input);
System.out.println("The value after store file of");
input.close();
System.out.println("The value after closing stream ");


C://please hlp me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic