请问网络连接的有关问题

请教网络连接的问题
就目前而言我只知道如何判断是否连接上了WIFI

if(RadioInfo.WAF_WLAN==RadioInfo.getActiveWAFs())
URL = URL + ";interface=wifi");

但是其它应该怎么检测,又该追加什么后缀呢,各位大虾,谁做过,能给个全面的吗!
------最佳解决方案--------------------

public static String getConnectionString() {
// This code is based on the connection code developed by Mike Nelson of
// AccelGolf.
// http://blog.accelgolf.com/2009/05/22/blackberry-cross-carrier-and-cross-network-http-connection
String connectionString = null;

// Simulator behaveior is controlled by the USE_IN_SIMULATOR
if (DeviceInfo.isSimulator()) {
connectionString = ";deviceside=true";
} else if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
// Wifi is the preferred transmission method
connectionString = ";interface=wifi";
}

// Is the carrier network the only way to connect?
else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) {
String carrierUid = getCarrierBIBSUid();
if (carrierUid == null) {
// Has carrier coverage, but not BIBS. So use the carrier's TCP
// network
connectionString = ";deviceside=true";
} else {
// otherwise, use the Uid to construct a valid carrier BIBS
// request
connectionString = ";deviceside=false;connectionUID=" + 
carrierUid + ";ConnectionType=mds-public";
}
}

// Check for an MDS connection instead (BlackBerry Enterprise Server)
else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS) {
connectionString = ";deviceside=false";
}

// If there is no connection available abort to avoid bugging the user
// unnecssarily.
else if (CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE) {
}

// In theory, all bases are covered so this shouldn't be reachable.
else {
connectionString = ";deviceside=true";
}

return connectionString;
}

------其他解决方案--------------------
多谢了,不过String carrierUid = getCarrierBIBSUid();
方法怎么实现的呢