This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes the ouput text file is unreadable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "the ouput text file is unreadable" Watch "the ouput text file is unreadable" New topic
Author

the ouput text file is unreadable

L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51

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

Joined: Oct 29, 2001
Posts: 9138
    
    9

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.


[How To Ask Questions On JavaRanch]
L Willie
Ranch Hand

Joined: Aug 10, 2008
Posts: 51
thank to Joe reply
 
Have you checked out Aspose?
 
subject: the ouput text file is unreadable
 
It's not a secret anymore!