>From what I know, you do not need to encode it in base64. Base64 is used to
encode certain part of the http header and not all of the data being sent.
The communication would follow normal http. So, the data at the client would
be a multipart data. Using the boundary string you should be able to get
your binary data. The jason hunter code could be used with a few changes.
Hope that helps,
Swapna
-----Original Message-----
From: Robert Zhang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 4:26 PM
To: [EMAIL PROTECTED]
Subject: multipart data
Hi,
I have a question about multipart data. I have a servlet that will go to
the database and return a text-binary-mixed message back to the client. The
client is a Java application using HttpURLConnection and streams to
communication with the servlet. I want to let the servlet send the message
altogether to the client. So I won't use multipart servlet implementation
like what's in Jason Hunter's book. Some people say the message has to be
base64 encoded to convert it into ascii text and then be decoded at the
receiving end. I understand this will definitely work. But can the servlet
simply send the data as a binary stream without encoding it? The client
application then will parse it into proper pieces. Since the client is an
application, not a browser, and all the client cares about is to receive
the original message with no loss of data, I don't see why the message HAS
to be base64 encoded. Am I right?
Thanks.
Robert
___________________________________________________________________________
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