+ /**
+ * The optional options that can be passed to the program.
+ *
+ * @author niki
+ */
+ private enum Option {
+ /**
+ * The encryption key for the input data (optional, but can also be
+ * empty <b>which is different</b> (it will then use an empty encryption
+ * key)).
+ */
+ KEY,
+ /**
+ * The encryption key for the output data (optional, but can also be
+ * empty <b>which is different</b> (it will then use an empty encryption
+ * key)).
+ */
+ FORWARD_KEY,
+ /** The trace level (1, 2, 3.. default is 1). */
+ TRACE_LEVEL,
+ /**
+ * The maximum length after which to truncate data to display (the whole
+ * data will still be sent).
+ */
+ MAX_DISPLAY_SIZE,
+ /** The help message. */
+ HELP,
+ }
+
+ static private String getSyntax() {
+ return "Syntax: (--options) (--) [NAME] [PORT] [FORWARD_HOST] [FORWARD_PORT]\n"//
+ + "\tNAME : the bridge name for display/debug purposes\n"//
+ + "\tPORT : the port to listen on\n"//
+ + "\tFORWARD_HOST : the host to connect to\n"//
+ + "\tFORWARD_PORT : the port to connect to\n"//
+ + "\n" //
+ + "\tOptions: \n" //
+ + "\t-- : no more options in the rest of the parameters\n" //
+ + "\t--help : this help message\n" //
+ + "\t--key : the INCOMING encryption key\n" //
+ + "\t--forward-key : the OUTGOING encryption key\n" //
+ + "\t--trace-level : the trace level (1, 2, 3... default is 1)\n" //
+ + "\t--max-display-size : the maximum size after which to \n"//
+ + "\t truncate the messages to display (the full message will still be sent)\n" //
+ ;
+ }
+