Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-11-2008, 12:57 AM
Member
 
Join Date: Oct 2008
Posts: 1
dantestein is on a distinguished road
Outputstream not streaming.
In the following code, can anybody please tell me at what point the data actually starts to get transferred and the popup "download file" box appears? I'm thinking that the dialog box should appear on the first outputstream.write and start transferring data. But I don't think that's the case because the "Page cannot be displayed" is displayed after "waiting" for quite awhile. On a smaller dataset (shorter while loop) with less "wait", dialog box eventually appears and the data gets transferred properly. Larger dataset with longer wait always times out.

Is there some sort of a web server configuration that tells it to write out the data ONLY if outputstream closes? I But isn't the default Transport "chunked"? Could it be possible that the web server somehow got configured to never use "chunked"? If so, how would that happen? We're using Oracle AppServer 10g. Thanks - any help would be appreciated.

response.setHeader("Expires", "0");
response.setHeader("Content-disposition","inline;filename=Download.csv");
response.setContentType("application/x-msdownload");
outputStream = response.getOutputStream();

bufferInBytes = this.getData();
while (bufferInBytes != null)
{
outputStream.write(bufferInBytes, 0, bufferInBytes.length);
outputStream.flush();
bufferInBytes = this.getData();
}

outputStream.close();
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
interrupting urlconnection's outputstream zynasis Networking 5 10-02-2008 02:49 AM
video streaming anniya0n Database 1 01-24-2008 07:35 PM
Converting InputStream to OutputStream Java Tip Java Tips 1 01-12-2008 12:13 AM
HashMap to share OutputStream gabriel Advanced Java 1 08-06-2007 07:47 PM
PeerStream Audio Video Streaming Server 4.61 levent Java Announcements 0 07-31-2007 09:50 PM


All times are GMT +3. The time now is 02:21 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org