aspose file tools*
The moose likes Java in General and the fly likes Multiple Files in an InputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Multiple Files in an InputStream" Watch "Multiple Files in an InputStream" New topic
Author

Multiple Files in an InputStream

Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
Hello,

I have a method that takes an arraylist of tif objects and sends them
to another method to extract them from a database and put them into
a HttpServletResponse to be sent to a tiff viewer applet running in a jsp.
My problem is that I need to send multiple files to the applet in a single stream for the viewer to show every file. Here is the code I have, which works for a single image.



Any suggestions, ideas would be greatly appreciated.

Chris Cornelius
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18150
    
    8

which works for a single image
Do you mean to imply that it doesn't work for more than one image? In what way doesn't it work?

I would expect it to not work because two or more images concatenated together in a single stream can't be handled by something that's expecting an image. But maybe the applet you're sending this to does have some way of extracting the images from the data stream, I don't know.
Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
The images are loaded, but the viewer only displays
the first image that is streamed. It might just be the
viewer, will look into that more.

Thanks,

Chris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Files in an InputStream
 
Similar Threads
Socket connection
interesting question
ContextRoot Problem
wrting multiple JPEG files to a Servlet output stream
Servlet can not show the proper photo from database