Michael Smith wrote:
> Using POIFS, I read in a .msg file, modify a few documents by deleting
> them and recreating them with the new contents, and then write the file
> back out. After writing the file, I try running the POIFSViewer on both
> the original and modified files to make sure the changes succeeded. For
> some reason though, the new file cannot be read using POIFSViewer. I'm
> getting the following error:
>
> $ java org.apache.poi.poifs.dev.POIFSViewer Modified.msg
> block[ 0 ] already removed
>
> Any thoughts on what might have happened to the POIFS that prevents it
> from being read by POIFSViewer? I'm using poi version 1.5.1.
To elaborate just a little bit... This occurs even if I do not make any
modifications. That is:
$ cat Tester.java
import java.io.IOException;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
public class Tester {
public static void main(String[] args) throws IOException {
POIFSFileSystem fs;
fs = new POIFSFileSystem(System.in);
fs.writeFilesystem(System.out);
}
}
$ javac Tester.java
$ java Tester < Original.msg > Modified.msg
$ java org.apache.poi.poifs.dev.POIFSViewer Modified.msg
block[ 0 ] already removed
regards,
michael
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>