Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

downloading slowdown

 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I had to test downloading logic in my desktop application.But I don't want to waste bandwidth.So,I want to put downloadable files in local server.

How can I slowdown downloading from localhost, like
downloading http://localhost:8080/abc/xyz.zip at normal download speeds
( I don't want to disturb headers like mime types set by Web Server,For resources we usually don't touch them as webserver takes care of how to serve them).
[ November 26, 2008: Message edited by: Pratap koritala ]
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you are not downloading any resource via any servlet but accessing the resource directly you cant do anything here. But if all the requests are going through a servlet and you write the content to the output streams with proper headers set from your servlet then maybe you can maybe use Thread.sleep (very bad idea though and have never tried such thing) and pause for some interval before writing the next set of bytes to the stream to simulate a slowed download. But what are you trying to achieve with this?
[ November 26, 2008: Message edited by: Amol Nayak ]
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you need a tool to throttle the bandwidth from the local server. I remeber seeing such tools. Try googling a bit
 
Ramya Chowdary
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to test my native application...
and I had to do it Offline.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic