Yes -- BlackBerry's transport implements least cost routing, so that when USB-cradled it will direct all socket and HTTP connections through the desktop automatically (and transparently to your program), and when disconnected it will instead go through the wireless network. In JDK 4.1, RIM added an API call so that you can detect this as well.
For documentation, try downloading the 4.1 CHM file I have on my website, www.jou.ca. From there, check out the SystemListener2 class, and in particular the USB_STATE_CABLE_* constants.
I looked at the SystemListener2 interface and its constants. It mainly talks about the USB connection states. But how will I know when my application tries to connect to the internet it uses my PC's network connection? This class does not seem to talk about this aspect of it, or am I not looking carefully?