ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  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");
// System.err.println(raf.readByte()+" "+raf.readByte()+" "+raf.readByte()+" "+raf.readByte());
System.err.println(i+" "+raf.readInt());
} catch (Exception e) {
throw new RuntimeException(e);

Can anbody give me the answer for this?

Thanks & Best Regards

1 to 1 of 1
1 to 1 of 1