File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "File Transferring using objectOutput/input Stream" Watch "File Transferring using objectOutput/input Stream" New topic

File Transferring using objectOutput/input Stream

Moazam Nabi Shaikh

Joined: Feb 07, 2004
Posts: 1
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.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

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]
I agree. Here's the link:
subject: File Transferring using objectOutput/input Stream
It's not a secret anymore!