Not sure if this is the best place to post this, but I think I can get
some help ....

I don't know if I am doing something wrong, but I can not make my
InputStream/OutputStream work on encr. mode or Zipped. I first tried to
use Cryptx cipher (Cipher.getInstance("SAFER/CBC", "Cryptix") per
exmaple) to build an input/outputstream and everything works if I use
standalone test (using ByteArrayInputStream, etc), but it doesn't work
if I try to build the stream based on the servlets input/output stream
on JWS like:

ObjectInputStream ois = new
ObjectInputStream(MyObj.getEncryptedInputStream(in));

where "in" is the "request.getInputStream();" from "HttpServletRequest
request". And the samething for the outputstream....

I tried to use the GZip stream to test my idea (and to compress of
course) like:

GZIPInputStream gzis = new GZIPInputStream(in);
ObjectInputStream ois = new ObjectInputStream(gzis);

and it didn't work either..

Of course it all works if I don't change the inputstream like:

ObjectInputStream ois = new ObjectInputStream(in);

So, I don't know if servlets inputstream should be treated dif. or what,

but running outside of JWS it all works.....

HELP!!

Here a dump of my errors:

I am getting the following error on GZIP....

: java.io.EOFException: Unexpected end of ZLIB input stream
:  at java.lang.Throwable.<init>(Compiled Code)
:  at java.lang.Exception.<init>(Compiled Code)
:  at java.io.IOException.<init>(Compiled Code)
:  at java.io.EOFException.<init>(Compiled Code)
:  at java.util.zip.InflaterInputStream.fill(Compiled Code)
:  at java.util.zip.InflaterInputStream.read(Compiled Code)
:  at java.util.zip.GZIPInputStream.read(Compiled Code)
:  at java.util.zip.InflaterInputStream.read(Compiled Code)
:  at java.io.ObjectInputStream.read(Compiled Code)
:  at java.io.DataInputStream.readShort(Compiled Code)
:  at java.io.ObjectInputStream.readShort(Compiled Code)
:  at java.io.ObjectInputStream.readStreamHeader(Compiled Code)
:  at java.io.ObjectInputStream.<init>(Compiled Code)


and the following on Encrypt

: java.io.EOFException: Expecting code
:  at java.lang.Throwable.<init>(Compiled Code)
:  at java.lang.Exception.<init>(Compiled Code)
:  at java.io.IOException.<init>(Compiled Code)
:  at java.io.EOFException.<init>(Compiled Code)
:  at java.io.ObjectInputStream.peekCode(Compiled Code)
:  at java.io.ObjectInputStream.SkipToEndOfBlockData(Compiled Code)
:  at java.io.ObjectInputStream.inputObject(Compiled Code)
:  at java.io.ObjectInputStream.readObject(Compiled Code)
:  at java.io.ObjectInputStream.readObject(Compiled Code)

I am doing a oos.writeObject(obj) and a oos.flush(); on the client
side....

Rodrigo



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to