This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring Batch Item Reader Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Spring Batch Item Reader" Watch "Spring Batch Item Reader" New topic
Author

Spring Batch Item Reader

Vis Deo
Ranch Hand

Joined: Jul 02, 2004
Posts: 40
Hi,
I want to know if ItemReader and flatfilereader - from spring batch package - does it read line by line data from file or read whole byte stream in memory?

I am trying to read fixed length flat file - large size - may be 30mb+ and extract few fields from each record. For e.g this file has each record that is size of 3000 char/bytes and I am interested in retrieving 2 fields from char position 10-30 and 2090-2100.

Because of large size 30MB+ I would like to read it line by line and creat javaobjects for each record. Therefore I want to know if flatfile reader reads line by line or loads whole file as bytestream in memory.

Thanks,
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 576

Reads line by line creating a 'Domain' object for each row - (usually used with the line mapper and tokenizers...)
It might do some internal buffering!!


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Spring Batch Item Reader
 
Similar Threads
Process the multiple records in a file by Producer/consumer concept using Multithreading
NX:[URLyBird]How to use the specified Data File Format?
How to read a file line by line?
effcient way to parse clob data
Can I change the current position in Stream??