Ravi Mandalapu

Ranch Hand
+ Follow
since Nov 01, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ravi Mandalapu

Hi,
I want to read flatfile data(delimiter is '|') into a Table.
I am new to I/O's.....
If anyone have idea's...or code please post it here....
Thankx in advanch....
Ravi
23 years ago
Hi Cundra Mundra,
Thank you very much for your response.
I have to display the prompt at the end of the file.
Could you please send me the sample code, if possible.
Because i am new to IO's.
Thank you very much.
Waiting for your response.
Ravi
23 years ago
Hi,
I want to write data to a file.
If i open the file to see my data, at the end of data there should be no return character fields.
Generally if we open a file, at the end of data we can add lines to this file, but in my case at the end of data i have to add "$username"(this is prompt).

Example: my data in a file :
// assume this is editor
field1 field2 field3 .......
username$ (Prompt)

I have to do like this:
field1 field2 field3 ....... username$
Here there is no prompt, the prompt should appear at the end of file......
Is it possible...
Any help would be greatly appreciate.
Thankx in advanch....
Ravi
23 years ago
HI spalaniv,
Thank you very much for your response.
My problem is I am devoloping Mailing system.(Using mailto://)
In body we will get result with + marks..
I don't want to see like that.
Just i want to see like spaces instead of + marks..
Is there any other solution for that?
I will be greatly appreciate for your response.
ravi

Yes, Cynthia is right.
public class URLEncoder
extends Object
The class contains a utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.
To convert a String, each character is examined in turn:
The ASCII characters 'a' through 'z', 'A' through 'Z', and '0' through '9' remain the same.
The space character ' ' is converted into a plus sign '+'.
All other characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the lower 8-bits of the character.

23 years ago
Hi Kim Kantola,
Thank you very much...
I fixed my problem...
ravi

Originally posted by Kim Kantola:
Hi,
the following code will read a file and return the files data a line at a time. I am not sure how you want to process your data, but this part will at least show you how to open a file and access the data a String at a time. bwin.readline() returns a null when it gets to the end of the file.
You can also use just FileReader and do in.read to return a character at a time if that better suits your purpose. (I can send another bit of code showing that if you are interested.)
Hope this helps,
Kim

public void readFile() throws IOException {
File inputFile = new File("C:\\myfile.txt");
FileReader in = new FileReader(inputFile); BufferedReader bwin = new BufferedReader(in);
String line;
while ((line=bwin.readLine()) !=null){
// code here to parse line and/or do
// whatever you want with data
System.out.println(line) // this will show you what you // read in from file
}
bwin.close();
in.close();
}


23 years ago
Hi,
I am new to I/O's.
I want to read data from file and display that data on form. If you have any sample code....
Any help would be greatly appeciate.
Ravi
23 years ago
HI Cynthia Yao,
Thank you very much for your response.
yes, u are right, but the problem is it is replacing spaces with "+". In result i am displaying + symbols....
If you have any suggessions, please let me know...
Thank you.
Ravi
23 years ago
Hi Cindy,
Thank you very much for your response.
My problem is, I have to invoke the NetscapeMessenger at client side and i have to pass the form data to Netscape messenger fields like CC,TO,BODY,.... for this reason i used MAILTO:// approach.
Suppose if i pass multible lines to Messenger body field,it is displaying total data in single line, suppose if we use javascript escape() function, it will convert newlinecharacters,spaces,.....into hex code and pass that data to Messenger.
I want the same functionality using java,is it possible?
Thankx in advanch.
Reply will be greatly appreciate.
ravi

Originally posted by Cindy Glass:
Well I am not JavaScript expert. What exactly does the escape() do? If you mean an escape character, that is the \ in Java. So \" forces a literal double quote.
If you are just trying to work with hex in java then prefacing the hex value with 0x makes it hex.
0x12 = 18 dec


23 years ago
Hi,
Is there any equivalent javascript's escape() function in java?
I want to hex-encode in java, that's why i need that function.
Any help would be greatly appeciate.
Thankx,
Ravi
23 years ago
Hi,
Is there any equivalent javascript's escape() function in java?
I want to hex-encode in java, that's why i need that function.
Any help would be greatly appeciate.
Thankx,
Ravi
23 years ago
Hi,
I devoloped E-mail application.
I am running the application fine. But i am getting runtime exception as :

java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>
com.sssw.rt.util.AgoException:
java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>

Actually i checked my class path, there i added mail.jar,...

I don't know exactly what's wrong....
Surprisingly application is working.

If any reply, would be greatly appeciate.

Ravi
[ January 07, 2006: Message edited by: Bear Bibeault ]
23 years ago
Hi
can anybody help me out about my problem mensioned above.
urgent please...
Ravi
23 years ago
Hi Mike,
Thank you very much for your response.
Yes, u are right.
I did the mailing application using JavaMail API.(no problem i am sending data properly(html data or text data))
But they want to send mails to their clients through Netscape Messenger.(Only that is the reason i am using mailto:// command)
Is there any other approach to invoke Messenger at client side?
After trasfering data from form to Messenger(What you said in first approach mailto://....),the user can't edit the Messenger fields(cc,to,body,...)they should be disabled.
How it is possible? Can we have any Messenger API for that?
Even if i trasfer data from form to messenger, the data is appearing in text format(even i send html data from form).
I don't have any idea how to access Messenger fields like body,to,cc.....
If you have any idea about this, kindly give some ideas...
i will be very much thankful for your reponse.
Thank you.
Ravi
23 years ago
Hi Mike,
Thank you very much for your response.
Yes, u are right.
I did the mailing application using JavaMail API.(no problem i am sending data properly(html data or text data))
But they want to send mails to their clients through Netscape Messenger.(Only that is the reason i am using mailto:// command)
Is there any other approach to invoke Messenger at client side?
After trasfering data from form to Messenger(What you said in first approach mailto://....),the user can't edit the Messenger fields(cc,to,body,...)they should be disabled.
How it is possible? Can we have any Messenger API for that?
Even if i trasfer data from form to messenger, the data is appearing in text format(even i send html data from form).
I don't have any idea how to access Messenger fields like body,to,cc.....
If you have any idea about this, kindly give some ideas...
i will be very much thankful for your reponse.
Thank you.
Ravi
23 years ago
Hi,
I have to invoke netscape messenger at client side.
I am thinking we can do this using mailto:// command.
i have to pass the form data(which i will get from database) to netscape messenger fields(like to,cc,bcc,subject body),user can't edit those fields in netscape Messenger(he can edit those fields in form), simply click send button in Netscape messenger.
Is there any help, would be greatly appreciate.
Thankx in advanch...
Ravi
23 years ago