[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: transfer files across different JVM using RMI



All JVM's will implement RMI the same way.  So yes, it should be possible,
but be concerned about large files.  Using RMI to transfer a file would
require reading the full file into memory, and then passing it as a
serializable parameter.

If you're likely to transfer really large files this way but want a simple
solution, I would consider using java.net.Socket instead.  You could define
a simple protocol (for example: connect, send file size, send file bytes,
disconnect) and easily use the socket's InputStream and OutputStream to
efficiently transfer your file of any size.  For small or medium size files,
however, RMI would be fine.

If you ultimately do decide to use FTP, take a look at the Bruce Blackshaw's
Java FTP client (http://www.enterprisedt.com/downloads/ftp.html).  It's
distributed under the lesser GNU GPL (suitable for commercial apps) and is
easy to use.


Hope this helps,

Kevin Chipalowsky
http://www.kevinchipalowsky.com




-----Original Message-----
From: linda fan [mailto:lxfan_2000@yahoo.com]
Sent: Wednesday, April 17, 2002 1:13 PM
To: ajug-members@www.ajug.org
Subject: transfer files accross different JVM using RMI


Hi,
Is it possible to transfer files to another JVM using
RMI without using FTP or HTTP protocol?
Thanks in advance!

Linda

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/