Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.2k views
in Java FTP by
Hey Guys,

so.. the edtftp Package is great, but i have one problem.

The put with byte[] make no new line in the target file. The byte code is build up with "\n".

I look now at the source of putData method and see there's a Property for Line.Separator ?!

Do I need the Property File? Where is it to store?! Whats the Content?

Or what can I do?

Thanks 4 help !

13 Answers

0 votes
by
How is it solved?

The thing that I find confusing is that it is the same code that does the put, for both byte arrays and files. So there shouldn't be any difference.

You should use the Line Separator "\r\n" :oops: :D :roll:

Thanks for help. It's solved.


My first try was only "\n" as Line Separator ! This made no new Line in the Target-File. But I have now with "\r\n" new Lines in my File :)

Exampe in String-Form:
Firste Line \n Second Line <= makes no new Line in Target-File

First Line \r\n Second Line <= makes a new Line in Target-File
0 votes
by (162k points)
Oh I see. "\n" is not a line separator on Windows, so it will not be translated as such when the data is FTP'ed.

My first try was only "\n" as Line Separator ! This made no new Line in the Target-File. But I have now with "\r\n" new Lines in my File :)
0 votes
by
Oh I see. "\n" is not a line separator on Windows, so it will not be translated as such when the data is FTP'ed.

My first try was only "\n" as Line Separator ! This made no new Line in the Target-File. But I have now with "\r\n" new Lines in my File :)


"\n" is a Windows Line Separator, but not a Unix and other OS-System's Line Separator and will not be translated.

So it's correctly.

Categories

...