If you wish to know measure network parameters of other applications I recommend you to read about JPcap.
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.
thanks for your response. but what i want is to no the network utilization for any time i want, not the network power.