Example usage for org.apache.commons.net.telnet TelnetOption MAX_OPTION_VALUE

List of usage examples for org.apache.commons.net.telnet TelnetOption MAX_OPTION_VALUE

Introduction

In this page you can find the example usage for org.apache.commons.net.telnet TelnetOption MAX_OPTION_VALUE.

Prototype

int MAX_OPTION_VALUE

To view the source code for org.apache.commons.net.telnet TelnetOption MAX_OPTION_VALUE.

Click Source Link

Document

The maximum value an option code can have.

Usage

From source file:org.eclipse.osee.ote.core.test.shells.TelnetShell.java

public void printOptionStates() {
    for (int i = 0; i < TelnetOption.MAX_OPTION_VALUE; i++) {
        String str = TelnetOption.getOption(i);
        if (!str.equals("UNASSIGNED")) {
            boolean local = telnet.getLocalOptionState(i);
            boolean remote = telnet.getRemoteOptionState(i);
            if (local || remote) {
                System.out.printf("%s (%02d): local %b, remote %b\n", TelnetOption.getOption(i), i, local,
                        remote);/*from  ww w.jav a2 s.  c  om*/
            }
        }
    }
}