This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 2367
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!