File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Urgent:BLOB Separation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Urgent:BLOB Separation" Watch "Urgent:BLOB Separation" New topic

Urgent:BLOB Separation

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

We have a form where we are storing two binary objects
BLOB ( image/gif file)
There is also a program called that
parses through the form and stores the parameters of the
image file like "content", "content-type",
"content-disposition" in a hash table.
Now when we have two files the problem is that the
"content" parameter is the same in case of both the files
ie I can't separate the binary streams.
To elaborate in the form the "name" parameter is "upload"
and "upload2" in two cases respectively.
There is an if - else loop so that the content in the two cases are separated. But the separation does not take place

How can we separate binary streams in the case of two
BLOB objects in a form ?

vik nuckchady

Joined: Apr 25, 2001
Posts: 25
when you read the information why don't you scan for the boundary header of the gif file. It is usually a header like gif98a ....
I have done an upload servlet where i use this technique to differentiate from where the file starts in the request string.
[This message has been edited by vik nuckchady (edited May 16, 2001).]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
"Nilanjan B",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Urgent:BLOB Separation
It's not a secret anymore!