public final class CmdType
extends java.lang.Object
A number of commands are specified by the OFTP protocol, they are all prefixed by a single character, and of a specific length for that command.
After every bit of data we send, we expect to receive a single char - [X|H|2|3|C|T|4|5|F|R|E|P|D] Which basically tells us exactly how long a string to expect.
Modifier and Type | Field and Description |
---|---|
static CmdType |
CD
The CD CmdType.
|
static CmdType |
CDT
The CDT CmdType.
|
static CmdType |
DATA
The DATA CmdType.
|
static CmdType |
EERP
The EERP CmdType.
|
static CmdType |
EFID
The EFID CmdType.
|
static CmdType |
EFNA
The EFNA CmdType.
|
static CmdType |
EFPA
The EFPA CmdType.
|
static CmdType |
ESID
The ESID CmdType.
|
static CmdType |
RTR
The RTR CmdType.
|
static CmdType |
SFID
The SFID CmdType
|
static CmdType |
SFNA
The SFNA CmdType.
|
static CmdType |
SFPA
The SFPA CmdType.
|
static CmdType |
SSID
The SSID CmdType.
|
static CmdType |
SSRM
the SSRM CmdType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(char c)
Simple Equality based on the command char.
|
char |
getCmd()
Get the command associated with this type.
|
static int |
getCommandLength(char c)
Return the length of the specified command
|
java.lang.String |
getDescription()
Get the description of the command.
|
int |
getLength()
Get the length of the command.
|
java.lang.String |
toString() |
public static final CmdType SSRM
public static final CmdType SSID
public static final CmdType SFID
public static final CmdType SFPA
public static final CmdType SFNA
public static final CmdType CDT
public static final CmdType EFID
public static final CmdType EFPA
public static final CmdType EFNA
public static final CmdType ESID
public static final CmdType CD
public static final CmdType EERP
public static final CmdType RTR
public static final CmdType DATA
public char getCmd()
public int getLength()
public java.lang.String getDescription()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(char c)
This is not a true Object.equals().
c
- the command read from the input streampublic static int getCommandLength(char c)
c
- the command read from the input.