Hi every one,
I'm new to Java and POI. Forgive me if the question is stupid.
I wrote the program to test POI, but dataStream is "empty". Any help is
appreciated.
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
public class PoiTest {
public static void main( String[] args ) throws IOException {
String fileName = "C:/hello.doc";
POIFSFileSystem fs = new POIFSFileSystem( new FileInputStream( fileName
)
);
HWPFDocument document = new HWPFDocument(fs);
byte[] stream = document.getDataStream();
System.out.println( stream.length );
}
}
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/why-doc-getDataStream-length-return-0-tp4307180p4307180.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]