java - Read single line from FTP server without downloading whole file using it.sauronsoftware.ftp4j.FTPClient -


how can read single line ftp server without downloading whole file using it.sauronsoftware.ftp4j.ftpclient.

now, downloading whole file , reading first line of file, there way can read first line of file without download file in local machine. should use it.sauronsoftware.ftp4j

@http://www.sauronsoftware.it/projects/ftp4j/manual.php

note : should use it.sauronsoftware.ftp4j.ftpclient , not apache.

mohit,

use socket dtconnection; dtconnection.getinputstream(); of ftp4j.ftpclient inputstream, using inputstream can read first line of.

you can find below example hoe read first line using inputstream

bufferedreader bufferedreader = null; string firstline = null;

bufferedreader = new bufferedreader(new inputstreamreader(this.datatransferinputstream, "utf-8")); firstline = bufferedreader.readline();

hope solution work you.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -