• Post Reply Bookmark Topic Watch Topic
  • New Topic

progress bar while reading object  RSS feed

 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there a simple way to show progress bar while reading a big object? Maybe my reader can be wrapped with another object which adds progress bar?
I have also the second question. I am writing a big object to file. Is there a chance to give writing thread a higher priority? I am using 'writeObject' method from ObjectOutputStream.
 
Rob Spoor
Sheriff
Posts: 21117
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lucas Smith wrote:Is there a simple way to show progress bar while reading a big object? Maybe my reader can be wrapped with another object which adds progress bar?

ProgressMonitorInputStream. It has one flaw though - it uses available() to determine the maximum for its matching ProgressMonitor. That (usually) works good for local files, but for anything read from the Internet it may not work as you want.

I am writing a big object to file. Is there a chance to give writing thread a higher priority? I am using 'writeObject' method from ObjectOutputStream.

Thread.setPriority(int priority).
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's clear, thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!