🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #587

InetAddress - no solution

#587
From: Martin Ry��nek
Date: Thu, 17 Sep 1998 00:00
20 lines
1271 bytes
Hello,

I have just byte[] array of 4 bytes and need to create regular InetAddress
class.

I don't know host's name and so. I only know host's IP address. I can't
create regular
InetAddress class, because I have to pass the name of the host to
constructor.

InetAddress inet = new InetAddress(null, array);
is NOT solution, because InetAddress is willing to create String with null
pointer.

If I pass "" string, I can not receive host name based on IP.

How can I receive host name based on IP, if I have just IP as 4 byte array ?

Martin
Technical Details
Message-ID: <360105eb.0@news.cvut.cz>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,e06616101d23416f,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: fb99b,e06616101d23416f,start
X-Google-Attributes: gidfb99b,public
X-Google-Thread: f5e83,e06616101d23416f,start
X-Google-Attributes: gidf5e83,public
From: "Martin Ry��nek" <rysanek@telecom.cz>
Subject: InetAddress - no solution
Date: 1998/09/17
Message-ID: <360105eb.0@news.cvut.cz>
X-Deja-AN: 392032433
Distribution: cz
X-NNTP-Posting-Host: pc7.telecom.cz
Organization: Ceske Vysoke Uceni Technicke, Praha
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: comp.lang.java.programmer,comp.lang.java.softwaretools,cz.comp.lang.java