2929 */
3030public final class InterfaceData {
3131
32- private InterfaceData () {
33- }
32+ private InterfaceData () {}
3433
3534 /**
3635 * Output list of interfaces to the console.
3736 */
3837 static void printInterfaces () {
3938 try {
40- final Enumeration <NetworkInterface > interfaces =
41- NetworkInterface .getNetworkInterfaces ();
39+ final Enumeration <NetworkInterface > interfaces = NetworkInterface .getNetworkInterfaces ();
4240 while (interfaces .hasMoreElements ()) {
4341 final NetworkInterface networkInterface = interfaces .nextElement ();
44- Manager .getManagerLogger ().simpleReport (
45- "Interface \" " + networkInterface .getDisplayName () + "\" - "
46- + networkInterface .getName () + " - Online:"
47- + networkInterface .isUp (), false );
48- final List <InterfaceAddress > listingAddress =
49- networkInterface .getInterfaceAddresses ();
42+ Manager .getManagerLogger ()
43+ .simpleReport (
44+ "Interface \" " + networkInterface .getDisplayName () + "\" - "
45+ + networkInterface .getName () + " - Online:"
46+ + networkInterface .isUp (),
47+ false );
48+ final List <InterfaceAddress > listingAddress = networkInterface .getInterfaceAddresses ();
5049 for (final InterfaceAddress singleAddress : listingAddress ) {
51- Manager .getManagerLogger (). simpleReport ( " \t " + singleAddress . getAddress (). getHostAddress (),
52- false );
50+ Manager .getManagerLogger ()
51+ . simpleReport ( " \t " + singleAddress . getAddress (). getHostAddress (), false );
5352 }
5453 }
5554 } catch (final SocketException e ) {
@@ -64,8 +63,8 @@ static void printInterfaces() {
6463 */
6564 public static boolean verifyNics (String intString ) {
6665 if (intString .contains ("-" )) {
67- Manager .getManagerLogger (). simpleReport ( "It appears a option was given instead of "
68- + "a list of interfaces?" , true );
66+ Manager .getManagerLogger ()
67+ . simpleReport ( "It appears a option was given instead of " + "a list of interfaces?" , true );
6968 return false ;
7069 }
7170 final List <String > singleInterfaces = new ArrayList <>(Arrays .asList (intString .split ("," )));
@@ -74,8 +73,7 @@ public static boolean verifyNics(String intString) {
7473 return false ;
7574 }
7675 try {
77- final Enumeration <NetworkInterface > interfaces =
78- NetworkInterface .getNetworkInterfaces ();
76+ final Enumeration <NetworkInterface > interfaces = NetworkInterface .getNetworkInterfaces ();
7977 while (interfaces .hasMoreElements ()) {
8078 final NetworkInterface networkInterface = interfaces .nextElement ();
8179 singleInterfaces .remove (networkInterface .getName ());
@@ -102,8 +100,7 @@ public static boolean verifyNics(String intString) {
102100 public static String [] getInterfaces () {
103101 List <String > ints = new ArrayList <>();
104102 try {
105- final Enumeration <NetworkInterface > interfaces =
106- NetworkInterface .getNetworkInterfaces ();
103+ final Enumeration <NetworkInterface > interfaces = NetworkInterface .getNetworkInterfaces ();
107104 while (interfaces .hasMoreElements ()) {
108105 final NetworkInterface networkInterface = interfaces .nextElement ();
109106 ints .add (networkInterface .getName ());
0 commit comments