Reading text file

Friends I am having a text file whose each line of data looks like below

George Bush 56 Washington DC,USA 100,000

AL Gore53 Florida,USA 75,000

Clinton54 Washington DC,USA50,000

etc.

Note that there are no delimiteres.

Now i want to read this file and populate the data into my Oracle table.Can anyone suggest how should i go about .Just tell me the Java related classes,methods etc that will be helpful to achieve my purpose.

Please help.

[522 byte] By [manohar2] at [2007-9-26 2:56:24]
# 1

Note That the data is perfectly in ordered form.I mean each datafield comes after certain bytes.Viewing the data i pasted here make it appear as if they are not ordered,right ?,but actually they are in perfectly orderly fashion.That Name is say 10 bytes,address starts from 11th bytes and salary starts from 23rd bytes etc etc.

manohar2 at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 2
There are dozens of methods you will have to use. Why don't you get started, and when you run into a problem ask a specific question?
DrClap at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 3
The methods Reader.readLine and String.substring certainly come to mind!
schapel at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 4
And the class java.util.StringTokenizer.
jsalonen at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 5
http://java.sun.com/j2se/1.3/docs/api/index.html
izy100 at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 6
As the data is well organized in cols and rows I would create a class MyData and a method like "readFixedString", convert the data to Oracle format and store it there.Klint
saen at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...
# 7
Can any one pls send me the code..i am in critical postions to read and validate the data against some formatPllllllllllllllllllllllllllllllllllllls
RajaChowdary at 2007-6-29 10:47:28 > top of Java-index,Archived Forums,Java Programming...