The following exception is generated when trying to read a file that zero bytes: ======================================== java.io.IOException: Unable to read entire header; -1 bytes read; expected 512 bytes at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:114) at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java ======================================== Provide a more descriptive exception message.
Modified to print 0 instead of -1. Makes a bit more sense, hopefully that is sufficient, if not reopen with a comment as to desired error text. java.io.IOException: Unable to read entire header; 0 bytes read; expected 512 bytes Jason