Bug 24149 - Error passing inputstream to POIFSFileSystem
Summary: Error passing inputstream to POIFSFileSystem
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: 2.0-pre3
Hardware: All other
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-10-27 14:46 UTC by vikas
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description vikas 2003-10-27 14:46:29 UTC
The file inside the zip file is to be read. 
The inputstream is taken from zip entry and passed to POIFSfilesystem. 

      ZipEntry zipentry = zip.getEntry(filename);
      InputStream inputstream=  zip.getInputStream(zipentry)

   public void getFile(InputStream teststream) throws TranslatorException
       POIFSFileSystem fs = new POIFSFileSystem(teststream);


    It is giving the error message that "Unable to read entire block;363 bytes 
read; expected 512 bytes

please fix the above bug.
Comment 1 Avik Sengupta 2003-10-27 15:06:42 UTC
I am not sure we do/should support this usage?? Are you sure this is a POI
issue? As in, are you sure zip.getInputStream() returns a binary file as is,
byte perfect? 
Comment 2 Chris Nokleberg 2003-10-27 19:56:23 UTC
I'm pretty sure this is the "slow inputstream" bug, which was fixed just after
2.0-pre3 was released.