Name name = ReverseMap.fromAddress(hostIp);
int type = Type.PTR;
int dclass = DClass.IN;
Record rec = Record.newRecord(name, type, dclass);
Message query = Message.newQuery(rec);
Message response = res.send(query);
Record[] answers = response.getSectionArray(Section.ANSWER);
if (answers.length == 0) {
// Fall back to standard Java: in contrast to dnsjava, this also reads /etc/hosts
return new InetSocketAddress(hostIp, 0).getAddress().getCanonicalHostName();