Article:
  Opening Microsoft File Formats to Java
Subject:   How to read word document without using POI?
Date:   2005-12-09 00:53:56
From:   indianattech
Response to: Where can i find the doc file contents..

Hi All,


I am trying to understand the word document format.


But it seems I am missing somewhere in identifying the FIB block,


After moving to the 24th byte, I am not getting the exact values. I do not why. In order to check whether I am doing the right thing or not I have written below test program for which I am getting alswys some unknown values. Even for the small files also fcMin position value is showing bigger than the actual file size


import java.io.*;
class WordTest
{
public static void main(String[] args)
{
try {
for(int i=0;i {
File f = new File("c:\\a.doc");
RandomAccessFile raf = new RandomAccessFile(f, "r");
raf.seek(i);
// System.err.println(raf.readByte()+" "+raf.readByte()+" "+raf.readByte()+" "+raf.readByte());
System.err.println(i+" "+raf.readInt());
//0011111000000000
raf.close();
Thread.sleep(10);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}



Can anbody give me the answer for this?


Thanks & Best Regards

Full Threads Newest First

Showing messages 1 through 1 of 1.

  • How to read word document without using POI?
    2010-03-24 04:32:08  nemosman [View]