File I/O Manipulation Prob

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2004
Posts: 6
Reputation: macca1979 is an unknown quantity at this point 
Solved Threads: 0
macca1979 macca1979 is offline Offline
Newbie Poster

File I/O Manipulation Prob

 
0
  #1
Jul 27th, 2004
Hey,

First off I'm really new to Java so please bear with me. I need to read in a file and translate it to a different output format. An example line segment from the input file has the following format:

"step(procs(),rule(1,A,B,vars(Na,Rv,ped(pk(B),cat(Na,A)))),procs())" (i)
This means that at step 1, A sends to B that which is contained in vars() i.e. Na, Rv and encryption of Na and A using B's public key [ped(pk(B),cat(Na,A))]

The output format I need is the following:

"K_B,t1(R(B,t1,(Na,Rv,e({Na,A},pk_B))))" (ii)

Basically this is generated from what is enclosed within rule() from (i) above. I have read up on how to use files and manipulate them and from what I've read I think i need to use string tokenisers to separate out the input format and thus build up the output form. However I really am at a loss as to how to begin coding this translation. If anyone has the time could they perhaps give me an example of some code that might solve this problem i.e. read in the file, translate the input to the form needed and then output the translated text to an output file. This is only a very small part of the overall translation that must be undertaken but seeing as I am so new to programming, if I could see how to get started the rest of the problem might not seem so daunting.

Thanks a million.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC