1 |
/* InetAddress.java -- Class to model an Internet address |
/* InetAddress.java -- Class to model an Internet address |
2 |
Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
640 |
public String |
public String |
641 |
toString() |
toString() |
642 |
{ |
{ |
643 |
return(getHostAddress()); |
StringBuffer sb; |
644 |
|
if (hostName != null) |
645 |
|
sb = new StringBuffer(hostName).append('/'); |
646 |
|
else if (hostname_alias != null) |
647 |
|
sb = new StringBuffer(hostname_alias).append('/'); |
648 |
|
else |
649 |
|
sb = new StringBuffer(); |
650 |
|
|
651 |
|
sb.append(getHostAddress()); |
652 |
|
return(sb.toString()); |
653 |
} |
} |
654 |
|
|
655 |
/** |
/** |