lpr-b:queryanswer
no way to compare when less than two revisions
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| — | lpr-b:queryanswer [13/11/2007 alle 18:55 (18 anni fa)] (versione attuale) – creata Marco Danelutto | ||
|---|---|---|---|
| Linea 1: | Linea 1: | ||
| + | <code java> | ||
| + | package nslookup; | ||
| + | import java.io.Serializable; | ||
| + | import java.net.InetAddress; | ||
| + | |||
| + | public class QueryAnswer implements Serializable { | ||
| + | |||
| + | InetAddress ia = null; | ||
| + | String hostName = null; | ||
| + | boolean valid = false; | ||
| + | | ||
| + | public QueryAnswer(String h, InetAddress i) { | ||
| + | ia = i; hostName = h; | ||
| + | valid = true; | ||
| + | } | ||
| + | | ||
| + | public QueryAnswer() { | ||
| + | valid = false; | ||
| + | } | ||
| + | |||
| + | public String getHostName() { | ||
| + | if(valid) | ||
| + | return hostName; | ||
| + | else | ||
| + | return null; } | ||
| + | public InetAddress getInetAddress() { | ||
| + | if(valid) | ||
| + | return ia; | ||
| + | else | ||
| + | return null; } | ||
| + | | ||
| + | public String toString() { | ||
| + | if(valid) return hostName+" | ||
| + | } | ||
| + | | ||
| + | } | ||
| + | </ | ||
lpr-b/queryanswer.txt · Ultima modifica: 13/11/2007 alle 18:55 (18 anni fa) da Marco Danelutto
