java_InetAddress.getByAddress()

1243 ワード

1 import java.net.InetAddress;

2 

3 public class T {

4   public static void main(String args[]) throws Exception {

5     byte[] bs = new byte[] { (byte) 192, (byte) 168, 0, 1 };

6     System.out.println(InetAddress.getByAddress(bs));

7   }

8 }