Search code examples
javaftprandom-access

Can and How do you use RandomAccessFile with a file contained on an FTP server?


This problem pertains to Java

By using RandomAccessFile I intend to be able to also modify the file without blanking it.


Solution

  • The FTP protocol only barely supports random access reads and writes.

    That is to say, an FTP client can use the REST command to start reading or writing from a particular offset, but it will always truncate the file from that point.