Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Send file with RMI

843793Jun 20 2001 — edited Feb 16 2002
Hi,

I tried to send a file from client to server with RMI as follow:
upload(String filename, InputStream in);
however the InputStream is not a Serializable.

1. Is it a correct method to send the file in RMI ? if not, what should be used?
2. How to "Serialize" the InputStream, I have tried to pass the "SerailInputStream" extends from InupStream object implements Serializable as a byte array by the ObjectOutputStream and retrieve it in server successfully, but the inputstream seems cannot be used.

Many thanks
George
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2002
Added on Jun 20 2001
6 comments
285 views