Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading bin files in java?

 
Tim frank
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
tim
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are going to read a binary file, you should use FileInputStream. For efficiency, wrap it in a BufferedInputStream.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic