943,866 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2803
  • Java RSS
Jul 27th, 2004
0

File I/O Manipulation Prob

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
macca1979 is offline Offline
6 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Passing arguments to jsp file
Next Thread in Java Forum Timeline: SIMPLE BOX GIVING ME PROBLEMS--this is homeowrk but i have tried for hours





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC