This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes File Transferring using objectOutput/input Stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "File Transferring using objectOutput/input Stream" Watch "File Transferring using objectOutput/input Stream" New topic
Author

File Transferring using objectOutput/input Stream

Moazam Nabi Shaikh
Greenhorn

Joined: Feb 07, 2004
Posts: 1
Hello,
I am making a software, in which i have put one facililty that user may download or share files. i want to do this by using objectoutput stream and input stream. i want to know your ideas or suggestion that how should i implement that.
Thanks
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Don't do that. Object-Streams are for exchanging Java objects -- they basically define a file format for storing in-memory data. The things you're talking about already have a file format -- they're files. Hence, just read and write them with FileInputStream/FileOutputStream.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: File Transferring using objectOutput/input Stream