If you're using Oracle it has pretty powerful import utility. SQL Loader
that can do quite a lot.

Otherwise you want to use a StringTokenizer for each line and a
LineNumberInputStream or it's equivalent reader to parse each line line at a
time.

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Larry Liu
> Sent: Thursday, August 31, 2000 7:17 PM
> To: [EMAIL PROTECTED]
> Subject: File parsing
>
>
> Hi:
>
>
> I have a flat text file exported from database, each record is in one line
> with line delimiter. Within one line of a record, there are delimiters for
> each field of data.
> The txt file could have large amount of data. I want to use this text file
> as an external data source read them into memory and parse them
> then follow
> my business
> logic to handle these data finaly put them into my data server. The
> questions are:
>
> 1. I certainly have to set buffer size to read number of records
> into memory
> instead of whole file into buffer.  Does anyone have any suggestions on it
> to handel it more efficiently?
> 2. I have to parse the number of records by the predefined
> delimiters. Does
> anyone have any suggestions to parse data more efficiently?
> 3. Can anyone sugest me on Servlet or Session bean level for this issue?
>
>
> Thanks
>
>
> Larry
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to