• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to cast PrintStream object in ObjectOutPutStream  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want to write formatted output on a notepad file using ObjectOutputStream but I am not getting it in human readable formatted form

Here is my person class



and here is my code for writing to object file




I want to know how to use printStream.print() like method to write formatted output


Thanks
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishor Joshi wrote:Hi I want to write formatted output on a notepad file using ObjectOutputStream but I am not getting it in human readable formatted form


The ObjectOutputStream class is for object serialization. The stream is not meant for human readability.

Henry
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe try this (click me)
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok knute let me try
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!