dcsimg
Files across network connections
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   matthew_magliocca
Posted On:   Saturday, March 17, 2007 03:49 PM

My application is designed to take a file from one system and upload it to another (both windows). I try and create a File object in my program and then I use writeObject to send it across the network to the other host. I then read the File into memory with FileInputStream(myfile) and write it into a new file on the new machine. The problem is that the file always comes to me empty. The name is right but there is no data inside of it. Can a file not be serialized across the network correctly? All I need to do is send a file across a socket connection to be read in by my program on the other machine. Can anyone tell me anything obvious I'm doing wrong? Thank you    More>>

My application is designed to take a file from one system and upload it to another (both windows).


I try and create a File object in my program and then I use writeObject to send it across the network to the other host.

I then read the File into memory with FileInputStream(myfile) and write it into a new file on the new machine.

The problem is that the file always comes to me empty.

The name is right but there is no data inside of it.

Can a file not be serialized across the network correctly? All I need to do is send a file across a socket connection to be read in by my program on the other machine.

Can anyone tell me anything obvious I'm doing wrong?


Thank you

   <<Less

Re: Files across network connections

Posted By:   WarnerJan_Veldhuis  
Posted On:   Saturday, March 17, 2007 05:23 PM

Are you flushing the streams when it's finished?
About | Sitemap | Contact