aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading and printing a file gives a space every other character