The mark method in InputStream does not work,
which is given in the API Documentation for that method.
May be you can make a copy of the InputStream or CLONE it
before you try to read the first 8 bytes and then use them
for the 2 different purpose that you want to.Although
this might not be a perfect way.
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of John
Nelson
Sent: Thursday, June 14, 2001 3:48 PM
To: [EMAIL PROTECTED]
Subject: Image Information Using MultipartParser
I have successfully implemented the MultipartParser servlet and I have
access to all of the form data. When I get a FilePart I want to read some
of the contents of the raw data. Ideally I want to read 2 bytes of data
starting at the 6th byte (the is the value of the width in a .gif file).
The problem I'm having is that once I read the data the pointer into the
ServletInputStream is on the 8th byte and when the file is written to disk I
lose the first 8 bytes. I cannot seem to use the mark() and reset() methods
of an InputStream - it doesn't work.
Has anyone successfully read the raw data from a FilePart and still written
the file to disk?
Thanks
-John Nelson
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html