Java Doc for NetworkInterface.java in  » 6.0-JDK-Modules » j2me » java » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.net.NetworkInterface

NetworkInterface
final public class NetworkInterface (Code)
This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface. It is used to identify the local interface on which a multicast group is joined. Interfaces are normally known by names such as "le0".
since:
   1.4



Constructor Summary
 NetworkInterface()
     Returns an NetworkInterface object with index set to 0 and name to null.
 NetworkInterface(String name, int index, InetAddress[] addrs)
    

Method Summary
public  booleanequals(Object obj)
     Compares this object against the specified object. The result is true if and only if the argument is not null and it represents the same NetworkInterface as this object.

Two instances of NetworkInterface represent the same NetworkInterface if both name and addrs are the same for both.
Parameters:
  obj - the object to compare against.

native static  NetworkInterfacegetByIndex(int index)
     Get a network interface given its index.
public static  NetworkInterfacegetByInetAddress(InetAddress addr)
     Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.

If the specified IP address is bound to multiple network interfaces it is not defined which network interface is returned.
Parameters:
  addr - The InetAddress to search with.

public static  NetworkInterfacegetByName(String name)
     Searches for the network interface with the specified name.
Parameters:
  name - The name of the network interface.
public  StringgetDisplayName()
     Get the display name of this network interface.
 intgetIndex()
     Get the index of this network interface.
public  EnumerationgetInetAddresses()
     Convenience method to return an Enumeration with all or a subset of the InetAddresses bound to this network interface.

If there is a security manager, its checkConnect method is called for each InetAddress.

public  StringgetName()
     Get the name of this network interface.
public static  EnumerationgetNetworkInterfaces()
     Returns all the interfaces on this machine.
public  inthashCode()
    
public  StringtoString()
    


Constructor Detail
NetworkInterface
NetworkInterface()(Code)
Returns an NetworkInterface object with index set to 0 and name to null. Setting such an interface on a MulticastSocket will cause the kernel to choose one interface for sending multicast packets.



NetworkInterface
NetworkInterface(String name, int index, InetAddress[] addrs)(Code)




Method Detail
equals
public boolean equals(Object obj)(Code)
Compares this object against the specified object. The result is true if and only if the argument is not null and it represents the same NetworkInterface as this object.

Two instances of NetworkInterface represent the same NetworkInterface if both name and addrs are the same for both.
Parameters:
  obj - the object to compare against. true if the objects are the same;false otherwise.
See Also:   java.net.InetAddress.getAddress




getByIndex
native static NetworkInterface getByIndex(int index) throws SocketException(Code)
Get a network interface given its index.
Parameters:
  index - an integer, the index of the interface the NetworkInterface obtained from its index
exception:
  SocketException - if an I/O error occurs.



getByInetAddress
public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException(Code)
Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.

If the specified IP address is bound to multiple network interfaces it is not defined which network interface is returned.
Parameters:
  addr - The InetAddress to search with. A NetworkInterface or null if there is no network interfacewith the specified IP address.
throws:
  SocketException - If an I/O error occurs.
throws:
  NullPointerException - If the specified address is null.




getByName
public static NetworkInterface getByName(String name) throws SocketException(Code)
Searches for the network interface with the specified name.
Parameters:
  name - The name of the network interface. A NetworkInterface with the specified name,or null if there is no network interfacewith the specified name.
throws:
  SocketException - If an I/O error occurs.
throws:
  NullPointerException - If the specified name is null.



getDisplayName
public String getDisplayName()(Code)
Get the display name of this network interface. A display name is a human readable String describing the network device. the display name of this network interface, or null if no display name is available.



getIndex
int getIndex()(Code)
Get the index of this network interface. the index of this network interface



getInetAddresses
public Enumeration getInetAddresses()(Code)
Convenience method to return an Enumeration with all or a subset of the InetAddresses bound to this network interface.

If there is a security manager, its checkConnect method is called for each InetAddress. Only InetAddresses where the checkConnect doesn't throw a SecurityException will be returned in the Enumeration. an Enumeration object with all or a subset of the InetAddressesbound to this network interface




getName
public String getName()(Code)
Get the name of this network interface. the name of this network interface



getNetworkInterfaces
public static Enumeration getNetworkInterfaces() throws SocketException(Code)
Returns all the interfaces on this machine. Returns null if no network interfaces could be found on this machine. NOTE: can use getNetworkInterfaces()+getInetAddresses() to obtain all IP addresses for this node an Enumeration of NetworkInterfaces found on this machine
exception:
  SocketException - if an I/O error occurs.



hashCode
public int hashCode()(Code)



toString
public String toString()(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.