Re: ftp in java



Christian wrote:
Mike Schilling schrieb:
Knute Johnson wrote:
micro wrote:
is there a better protocol to upload files to server than FTP and
supported by java?
thanks alot to all of you
FTP is an existing protocol. There are FTP servers and clients
available for every platform.

Transferring files is just a matter of copying bytes from one place to
another. I've written numerous programs to do that with Java. The
real question is what are you really trying to do? If you want to
send files to existing FTP servers then and FTP client would be the
tool to use. If you have a Java program and need to send files
between two locations, you can just make a connection and send the
bytes. It isn't that complicated. I wouldn't recreate what exists
and I wouldn't hesitate to write something simple to transfer files
around.

FTP is highly optimized. If you're sending large files and performance is important, it makes more sense to use FTP than to roll your own file-transfer protocol, in Java or any other language.

In what sense is it optimized?

The Big problem is that FTP has no verification for files.
After transferring a file you never know if it has been transferred without errors ... no hashing not even a stupid crc-check is done
imho FTP should die as soon as possible.
Its a danger to any files integrity.

HTTP is no different.

That type of check are usually done at a higher level than basic
file transfer.

Like first transferring both real file and checksum file, so the
real file can be verified.

Besides lots of files are transferred as ZIP files and then
ZIP provides CRC check.

Arne
.



Relevant Pages

  • Re: ftp in java
    ... If you're sending large files and performance is important, it makes more sense to use FTP than to roll your own file-transfer protocol, in Java or any other language. ... I don't believe there's really any scope for optimising the protocol itself - TCP is TCP. ... transferring a file you never know if it has been transferred without errors ... ...
    (comp.lang.java.programmer)
  • Re: ftp in java
    ... FTP is an existing protocol. ... There are FTP servers and clients ... Transferring files is just a matter of copying bytes from one ... I've written numerous programs to do that with Java. ...
    (comp.lang.java.programmer)
  • Re: FTP files in their directory structure from HFS to AIX
    ... transferring that, then untarring it? ... FTP files in their directory structure from HFS to AIX ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: Fedora Core 2 Update: kernel-2.6.6-1.435
    ... >> blow away an ftp mirror, ... for small files, use http. ... > better at transferring large files and maximizing bandwidth. ... it has great anonymous upload features. ...
    (Fedora)
  • Re: ftp in java
    ... FTP is an existing protocol. ... There are FTP servers and clients ... Transferring files is just a matter of copying bytes from one place ... I've written numerous programs to do that with Java. ...
    (comp.lang.java.programmer)