Article:
  Opening Microsoft File Formats to Java
Subject:   Where can i find the doc file contents..
Date:   2005-11-20 22:35:45
From:   Althafuddeen
hi,
POI classes are working fine in my PC.NOw
I want to get the contents (individual words) within the doc file.So let me know in which class it is stored?..if in other format, how to convert it?.Waitin for reply
Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • How to read word document without using POI?
    2005-12-09 00:53:56  indianattech [View]

    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
    • How to read word document without using POI?
      2010-03-24 04:32:08  nemosman [View]

  • Where can i find the doc file contents..
    2005-12-09 00:53:01  indianattech [View]

    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