I have a Java swing application that can uploads files to a server. It uses all the available upload bandwidth and that's okay when I'm at home. But it uses up a massive amount of upload bandwidth when I'm at work and so I wish to have some setting to limit bandwidth usage. How do I do it?
It's a multithreaded application so overriding the read method and adding extra logic would make the code more complex.
Is there a simple JVM setting for that? Or is there some java method like SomeJREClass.setMaximumAllowedBandwidth(int); ?
Thanks in advance