public class SignatureCommand extends ComPortCommand
SIGNATURE command.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENCODING |
| Constructor and Description |
|---|
SignatureCommand(boolean client)
Encoding constructor for signature requests.
|
SignatureCommand(boolean client,
java.lang.String signature)
Encoding constructor.
|
SignatureCommand(int[] bytes)
Decoding constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
decodeFailed() |
java.lang.String |
getSignature() |
java.lang.String |
toString()
Get the human-readable description of this option.
|
void |
visit(ComPortCommandSwitch sw)
Apply visitor pattern.
|
equals, getBytes, getCommand, getName, hashCode, isServerCommandpublic static final java.lang.String ENCODING
public SignatureCommand(int[] bytes)
bytes - encoded option starting with the COM-PORT-OPTION byte
NullPointerException if bytes is null
IllegalArgumentException if bytes has length that is too short or too long
IllegalArgumentException if bytes[0] is not RFC2217.COM_PORT_OPTION
IllegalArgumentException if bytes[1] is not RFC2217.SIGNATURE (client or server)public SignatureCommand(boolean client,
java.lang.String signature)
signature - signature stringclient - true for the client-to-server command, false for the server-to-client commandpublic SignatureCommand(boolean client)
client - true for the client command, false for the server commandpublic java.lang.String toString()
ComPortCommandtoString in class ComPortCommandpublic void visit(ComPortCommandSwitch sw)
ComPortCommandvisit in class ComPortCommandsw - visitor switch handlerpublic java.lang.String getSignature()
public boolean decodeFailed()