Question :How can I create an ObjectInputStream from an ObjectOutputStream
without a file in between? (CoreJava)
Answer :ObjectOutputStream and ObjectInputStream work to/from any stream
object. You could use a ByteArrayOutputStream and then get the array
and insert it into a ByteArrayInputStream. You could also use the piped
stream classes as well. Any java.io class that extends the OutputStream
and InputStream classes can be used.
Alternatively, the ObjectOutputStream> class implements a reset method
that discards the memory of having sent an object, so sending an object
again will make a copy.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Thursday, March 12, 2009
How can I create an ObjectInputStream from an ObjectOutputStream
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment