Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 11th, 2005, 11:40 AM   #1
blindasfcuk
Newbie
 
Join Date: Apr 2005
Posts: 1
Rep Power: 0 blindasfcuk is on a distinguished road
Sending files over a network

Has any one any experience of sending files over a network using java? I have the JFilechooser working where I select the file I want then when I try to put it in a ObjectOutputStream I get an error that tells me that the stream header is wrong can anyone help?
blindasfcuk is offline   Reply With Quote
Old Apr 12th, 2005, 7:02 AM   #2
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
i was working on something like that, but then it got complicating and i'm also studying and right now now i'm so damn hungry, i'd even eat the last pie at the petrol station's shop.

you'll have to read from your file and then transfer it to the other computer where it will have a file open somewhere and read from your stream and write whatever comes its way into the file. i'm reading a byte, sending it to the other pc and then on that side, reading it from the stream and writing it to a file. doing that until the sender has reached the end of the file.

don't know if it works yet.Ü
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Old Apr 12th, 2005, 7:59 AM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I was going to mention that, piece-mealing the data over in packets and reconstructing it on the other side.... but, what would happen with concurrent processing. If there are no "checks and balances" in place, the data would get hammered and the files would be invalid at best.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Apr 18th, 2005, 9:39 AM   #4
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
ok, i finished mine and tested it on localhost. the problem i get, is that it runs my processor at 100%. i thought it might need a thread when it's sending and receiving, but that didn't seem to help. i can understand why it's doing that, but not how to free up my processor... if that makes sense.
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC