📄 getlocalhost.java
字号:
package SOMA.utility;
import java.io.*;
import java.net.*;
/** Serializza su Sytsem.out l'Indirizzo locale.
* @author Livio Profiri
* @version 19/2/99
*/
public class GetLocalHost
{
public static void main( String argv[] )
{
InetAddress Indirizzo = null;
try
{
Indirizzo = InetAddress.getLocalHost();
ObjectOutputStream Out = new ObjectOutputStream( System.out );
Out.writeObject( Indirizzo );
Out.flush();
Out.close();
}
catch( Exception e )
{
System.out.flush();
System.out.close();
}
}
/**
* Determina l'indirizzo IP attuale.
*
* L'indirizzo IP viene richiesto ad un processo esterno, quindi si
* tratta dell'indirizzo effettivo, non di quello gi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -