Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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
Posts: 9280
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