Re: [Aglets-developer] How i can make the Aglet transfer a file to another computers?
Status: Beta
Brought to you by:
cat4hire
From: Luca F. <cat...@ti...> - 2005-04-21 10:25:16
|
On Tuesday 19 April 2005 09:37 Ghada Moustafa's cat walking on the keyboard wrote: > Hi all, > > In my project i want the Aglet send a file to another computers,In more > details: > > In onCreation method of my Aglet,i write a code that create a file and also > write data in it. so when i run my Aglet i found the file and the data > written in it.But now i want this my Aglet send this file to other > computers on LAN. > > Can anyone help me in this. > Files are not serializable, thus you have to transfer it manually. A first choice could be to wrap the file content in a java object(s). For example, if the file is a text file, you can take the whole content in a string object, move the aglet to the destination and write the string into a file. Another solution is to implement a certain way to transfer the file from your agent to the destination host, for exmaple through ftp. Luca -- Luca Ferrari, cat...@ti... |