This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the ouput text file is unreadable

 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

although the input value retrieve from the output text is correct,however the output text is unreadable or can not understand the meaning.it is cause of type different?
 
Joe Ess
Bartender
Pie
Posts: 9264
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DataOutputStream writes primitive Java types in a platform-portable way. It is not intended to be human-readable. If you want to write human-readable data, you'll have to format the data on the way out and parse the data on the way back in.
Have a look at the Java Tutorial chapter on IO for how to correctly use Java classes to perform IO.
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank to Joe reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic