This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Efficient Streaming Methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Efficient Streaming Methods" Watch "Efficient Streaming Methods" New topic
Author

Efficient Streaming Methods

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I'm looking for serveral ways to efficently stream files to my browser where I set the mime type. (*Not byte by byte but larger chunks) I want to stream PDF files as well as other files effienctly and haven't found a method that will work for me yet. Currently I'm doing it byte by byte and it takes a minute or two to bring up a pdf file. This simply is taking too long. Any and all solutions would be great.
-Dale


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Well since no one here seems to really know.. I found a solution that works. I was really looking for a way of quickly streaming a pdf file so the file can get the files onto the customers screen quickly. Streaming the file byte by byte it took too long. Below is the solution for doing it in larger chuncks. I put in comments to help anyone else out there looking to do this.

Regards,
Dale
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Efficient Streaming Methods
 
Similar Threads
Convert PDF to JPG, byte streams
Showing PDF in a new window
What's the best way to download files from a web app?
JasperReports with GWT
pdf load status