This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes reading and printing a file gives a space every other character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "reading and printing a file gives a space every other character" Watch "reading and printing a file gives a space every other character" New topic
Author

reading and printing a file gives a space every other character

Fritz Urling
Greenhorn

Joined: Jan 09, 2006
Posts: 13
I use iTunes to create a file (File -> export library -> save as '*.txt'). I can open the file with notepad, and it looks fine.

But when i open it with Java and print it, there is an extra blank character between each character


I use a hex editor to view the source file, and sure enough, every other byte is a null. Am I reading the file wrong? Here's the heart of my file reading:



[ August 25, 2007: Message edited by: Fritz Urling ]
[ August 25, 2007: Message edited by: Fritz Urling ]
 
Have you checked out Aspose?
 
subject: reading and printing a file gives a space every other character
 
It's not a secret anymore!