File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Reading bin files in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reading bin files in java?" Watch "Reading bin files in java?" New topic

Reading bin files in java?

Tim frank

Joined: Mar 07, 2006
Posts: 25
Hey does anyone know how i can read the characters or bits of a bin file? i've been trying to use CharBuffer but can't figure it out at all as the API isn't very helpful.
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
If you are going to read a binary file, you should use FileInputStream. For efficiency, wrap it in a BufferedInputStream.
I agree. Here's the link:
subject: Reading bin files in java?
It's not a secret anymore!