InetAddress질문입니다.
또야
2023.04.01
ip를 도메인으로 바꾸려고 하는데오....
InetAddress inet = InetAddress.getByName(아이피 주소);
System.out.println(intet.getHostName());
이렇게 하면 ip-----------domainName 으로 나와야하는데 입력한 ip가 출력이 됨니다...
원이 뭔가요???
api에는 분면 ip에 해당하는 도메인을 string으로 반환한다고 했는데.....
답변을 기다립니다....^^
-
딥블랙
^^!제가 밑에있는걸 못 봤네요...영어가 짧아서...감사요....
-
가온누리
api문서를 보면 리턴값이 아래와 같다고 하네요.
the host name for this IP address, or if the operation is not allowed by the security check, the textual representation of the IP address.
(이 IP 주소의 호스트명. 시큐러티 체크에 의해 조작이 허가되지 않는 경우는 IP 주소의 텍스트 표현)