poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@apache.org>
Subject Re: Error occurred: Invalid header signature; read 3255307777713450495, expected -2226271756974174256
Date Wed, 08 Oct 2003 23:48:24 GMT
On 10/8/03 6:22 PM, "Michael Zalewski" <zalewski@optonline.net> wrote:
> 
> The problem is that only a portion of the request input stream contains the
> uploaded Excel file. You need to break out that portion, and pass only the
> Excel bytes to POI. The bad news is that POI gives you no help to do this.
> The good news is that you can use other Open Source software, such as the
> FileUpload component in http://jakarta.apache.org/commons, to help you with
> multipart form data decoding.
>

Umm...why should POI parse your mime or any other encoding for you?  I'd
probably reject any patches to that effect as its "everything but the
kitchen sink"...  A tight scope keeps the project alive.

-andy
 
> -----Original Message-----
> From: Dhanore, Prakash (SUPP) [mailto:prakash.dhanore@gesupply.com]
> Sent: Tuesday, October 07, 2003 9:40 AM
> To: poi-dev@jakarta.apache.org
> Subject: Error occurred: Invalid header signature; read 3255307777713450495,
> expected -2226271756974174256
> 
> Hi,
> I am trying to upload the excel file and I am getting error below. One of
> the FAQ says that I have to remove the header information from the
> HTTPRequest object but I am not sure how to remove that. I am using weblogic
> 6.1.
> This is the code generating this error:
>         InputStream fin = request.getInputStream();
>         BlockingInputStream bis = new BlockingInputStream(fin);
>         ByteArrayOutputStream baos = new ByteArrayOutputStream();
>         int ch= -1;
>         baos.write(ch);
>         while ((ch=bis.read()) > -1){
>           baos.write(ch);
>         }
>         byte[] inputBytes = baos.toByteArray();
>         POIFSFileSystem fs= new POIFSFileSystem(new
> ByteArrayInputStream(inputBytes));
>         HSSFWorkbook wb = new HSSFWorkbook(request.getInputStream());
> Error occurred: Invalid header signature; read 3255307777713450495,
> expected -2226271756974174256
> 
> Thanks,
> Prakash
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message