Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Java, Is there any file reading classes that don't get stopped at line breaks \n?

This topic is 4906 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was wondering if there are any text file reading classes that don't get interupted at line breaks "\n" ? I might be able to get around that, but it would be nicer to have a class that could read the entire line without stopping at the line breaks. Thanks

Share this post


Link to post
Share on other sites
Advertisement
"Text file" is incompatible with "don't get interrupted at \n"; the idea behind opening something in text mode rather than binary mode (and I know Java doesn't have things like ios::text or ios::binary; I'm talking conceptually) is that newlines get special treatment - in particular, they are separators.

That said, you might consider ByteArrayInputStream or DataInputStream (which are really intended to work with "binary files", however accurately you suppose that can be defined...).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!