Sign in to follow this  

Is it ok to store a whole lot of data on one line of a text file?

This topic is 4687 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'm storing information from a html form, by using java to save the text file. I was wondering if it matters to store everything on one line? As it would make it much easier to read/write. There will be quite a bit of text btw. Thanks

Share this post


Link to post
Share on other sites
Sure. Actually, splitting things into multiple lines takes up more memory as you need two extra bytes (0x0D and 0x0A) for each line break.

[edit]edited for readability[/edit]

[Edited by - Sam Gamgee on February 9, 2005 11:25:47 PM]

Share this post


Link to post
Share on other sites
It won't hurt anything but if you're going to store things in text files anyway you probably want them to be at least sort of human-readable so I'd say you should put the linebreaks in. Some text editors will choke on if lines are extremely long.

Share this post


Link to post
Share on other sites

This topic is 4687 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this