reading text from a file in java?

Doodlez

New member
In Java, is it possible to read text from a file type other than a plain text doc? (.txt extension) like can i make it read text from say i microsoft word doc (.docx) or a .wps doc?

i did try it, i just made a word doc, and put the doc name with extension in my program.
so that line of code reads fileIn = new BufferedReader(new FileReader("doc1.docx"));

and then i did the whole input line bit uno fileIn.readLine() and i didnt use a loop, i only wanted it to read the first line to test. but when i ran the program i got this a bunch of garbage ("PK! ) and actually there was more than that, with this in the middle "[Content_Types].xml"

so in other words it didnt work. so, is there a way to make my file read text from a ".docx" file????
 
Back
Top