File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes infinite length of data 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 » Java in General
Bookmark "infinite length of data" Watch "infinite length of data" New topic

infinite length of data

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Here's what I want to do.. I want to be able to allow my users the possiblity of putting in a ton of data into my system. The datafields will be linked as such
1 This da 2
2 ta might 3
3 be many 4
4 charact 5
5 ers big. 6
6 As many 7
7 as 1000 -
This is a link list of data. I'm sure I can do it. I'm just not sure if anyone has done this already.. and if so. what things might I run into.

By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
I guess the main thing is probably: resist the temptation to concatenate all the lines into one big String, unless you really, really have to. The details of processing will depend on what you're trying to do - but often you can "process as you go", reading n bytes or lines at a time, doing something with them, and writing the result to an output file, or database, or whatever, before reading the next n bytes or lines. Thus you never need to build up too much stuff in memory.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: infinite length of data
It's not a secret anymore!