• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

recording speed

 
Ashley Swinson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my J2ME application, I need to time how long it takes for files to transfer from the server to the client (in KB per second for example). Does J2ME have any classes that would allow me to do this? How would I go about timing the transfer?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a Filter in front of the servlet that receives the file download/upload request. Or do you need to show a "progress bar" for the user while transferring?
 
Ashley Swinson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'm transfering files over a wireless ad-hoc connection between two laptops. I'm not using a webserver. So, I can't use filters. Are there any methods that I might be able to use?
Thanks!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Two laptops. Why are you using J2ME then when you could use J2SE?
 
Ashley Swinson
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using J2ME because it is required by my research.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Are you using Bluetooth?

The problem is that J2ME (MIDP/CLDC) doesn't require devices to implement server sockets which means that the two emulators (I assume you're running some kind of device emulators on those laptops) can't connect with each other using TCP. Bluetooth should work, though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic