passing objects


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :Sung Yi 2000³â 2¿ù 24ÀÏ 23:53:50

In Reply to: ¼­ºí¸´°ú ¾ÖÇø´°£ Serialize Åë½Å¿¡ °üÇÏ¿©... posted by Çö¼º on 2000³â 2¿ù 23ÀÏ 00:05:45:

Hello,


I am using the following method in my RMI server and it seems like working OK. It's alomost like yours except for the file stream.


public String sendObject(Object obj, String objName){
try{
FileOutputStream out = new FileOutputStream(objName);
ObjectOutputStream os = new ObjectOutputStream(out);

os.writeObject(obj);
os.flush();


os.close();
out.close();

return objName;
}
catch(IOException iox){
System.out.println("Failed to send an object");
}


return null;
}


´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]