@ Override public void introspect ( final PrintWriter writer ) throws Exception { // Put out a header before the information writer . println ( "Network Interface Information" ) ; writer . println ( "-----------------------------" ) ; // Extract the interface information inside a doPriv try { AccessController . doPrivileged ( new PrivilegedExceptionAction < Void > ( ) { @ Override public Void run ( ) throws IOException { // Iterate over the system network interfaces Enumeration < NetworkInterface > interfaces = NetworkInterface . getNetworkInterfaces ( ) ; while ( interfaces . hasMoreElements ( ) ) { getInterfaceInfo ( interfaces . nextElement ( ) , writer ) ; } return null ; } } ) ; } catch ( PrivilegedActionException pae ) { throw ( Exception ) pae . getCause ( ) ; } }
Introspect all network interfaces for diagnostic information .