Так как никто больше еще не сказал это (я Думаю), моей любимой функцией является Автоматическая упаковка!
public class Example
{
public static void main(String[] Args)
{
int a = 5;
Integer b = a; // Box!
System.out.println("A : " + a);
System.out.println("B : " + b);
}
}
Вы можете использовать Network List Manager API , чтобы получить список сетей с помощью IEnumNetworks
. Затем используйте интерфейс INetwork для получения сетевой информации.
You can use RasEnumConnections
to enumerate the current connections. You can then call RasGetLinkStatistics
to get information about each link (connection speed, amount of data sent and/or received, time connected, etc.) If you want to know the address assigned to the client on a PPP connection, you have to retrieve that separately with RasGetProjectionInfo
. If you want information about the connection (e.g. the name of the modem) you can retrieve that with RasGetConnectStatus
.