File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(FUNDAMENTALS)which use 8 bit US Ascii??

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm ashamed to say it but, I/O has allways been my weak side. Which I/O readers and writers read and write 8 bit US ASCII data to files???
 
Sam Moran
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not an expert, but here is what I know from the work that I've been trying to do:
The basic ASCII Character set has 128 characters.
A byte, as defined by Java as a primitive data type, has a size of 8 bits, and it's range is from -128 to 127.
Most programs should use readers and writers to read and write textual information. The reason is that they can handle any character in the Unicode character set, whereas the byte streams are limited to ISO-Latin-1 8-bit bytes.
Based on the above statement from Sun itself, and based on what I have done if you want to write a simple text file then you want to use the Reader and Writer Objects. For true binary files you want to use InputStream and OutputStream.
I hope this helps!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic