Can an开发者_Go百科yone tell me how to get network statistics using Java? Or how to measure network performance with simple time related metrics?
Thanks a lot!
It depends what do you mean. If you want to measure network speed when downloading or uploading something you can create network connection, send some garbage and measure how long does it take to send. Better results can be achieved if both server and client sides are under your control. But you can even write simple client that downloads file from external URL and measure how long does it take.
If you wish to know measure network parameters of other applications I recommend you to read about JPcap.
If you are looking for Bandwidth monitoring using Java, check the link below. http://docstore.mik.ua/orelly/java-ent/dist/ch08_04.htm
精彩评论