By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,655 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,655 IT Pros & Developers. It's quick & easy.

files upload java

P: 12
I have file.Data in the file are like this.

Probable Cause: The network operator has issued an alter attribute command for invalid.
Action Taken : The parameter value is changed from the old value to the newvalue is invalid.

In above data,probable cause and action taken are the column of database table,and i have to store their value(after ":") in their respective column.The value are in the multiple line as you see in above sample.I wanted to retrieve the data from Probable Cause: to Action Taken and store in a variable.As the value is in multiple line so i'm getting trouble while reading through bufferedReader readLine() method.It reads one line at a time..

Can someone help me,provide me the logic how should i do?

Thanks in advance.
Mar 9 '12 #1
Share this Question
Share on Google+
1 Reply

P: 13,264
If the value part will never contain a colon then read the value into a string until you encounter a line with a colon and don't include that line with the colon.
You can split the column name from the value part using String.split(":");
Mar 9 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.