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

read abstract workflow from text file and load into ADT

P: 1
How can I read an abstract workflow from a txt file and load it into an ADT? I know my question contains too many things but I'd appreciate if you guide me and tell what the steps are!
May 26 '13 #1
Share this Question
Share on Google+
2 Replies


Nepomuk
Expert 2.5K+
P: 3,112
Hi Roham and welcome to bytes.com!

What exactly you'll need depends on the kind of workflow you want to use; generally speaking however you'll need to read the file and interpret it in some fashion.
  1. Reading text files in Java is done with InputStreams, this tutorial should help you getting a grip of them.
  2. Next you'll want to have greater control over what exactly is read; going through the text one character at a time isn't very efficient after all. A great way to do that in Java is with Scanners. Luckily, there's a tutorial for that too!
  3. Finally, you may want to interpret those text files based on structures; regular expressions are great for that. Check this list of tutorials to learn about those.
An alternative to txt files may be xml files; while they may be slightly bigger in file size, there are libraries that make interpreting them much easier than text files.
May 26 '13 #2

Nepomuk
Expert 2.5K+
P: 3,112
@zeeshanaayan07
Do you mean whether the workflow is in a PDF file? Or whether these instructions for reading files will work for PDF files too?

The above instructions will not work for PDF files, only with plain text files. If you want to work with PDFs you'll need external libraries designed for just that; Apache PDFBox and iText are two such libraries, though I must admit I've never worked with either.
May 26 '13 #3

Post your reply

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