Package gnu.io.rfc2217
Class SignatureCommand
- java.lang.Object
-
- gnu.io.rfc2217.ComPortCommand
-
- gnu.io.rfc2217.SignatureCommand
-
public class SignatureCommand extends ComPortCommand
RFC 2217SIGNATURE
command.- See Also:
- RFC 2217
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ENCODING
-
Constructor Summary
Constructors Constructor Description SignatureCommand(boolean client)
Encoding constructor for signature requests.SignatureCommand(boolean client, java.lang.String signature)
Encoding constructor.SignatureCommand(int[] bytes)
Decoding constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class gnu.io.rfc2217.ComPortCommand
equals, getBytes, getCommand, getName, hashCode, isServerCommand
-
-
-
-
Field Detail
-
ENCODING
public static final java.lang.String ENCODING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SignatureCommand
public SignatureCommand(int[] bytes)
Decoding constructor.- Parameters:
bytes
- encoded option starting with theCOM-PORT-OPTION
byte NullPointerException ifbytes
is null IllegalArgumentException ifbytes
has length that is too short or too long IllegalArgumentException ifbytes[0]
is notRFC2217.COM_PORT_OPTION
IllegalArgumentException ifbytes[1]
is notRFC2217.SIGNATURE
(client or server)
-
SignatureCommand
public SignatureCommand(boolean client, java.lang.String signature)
Encoding constructor.- Parameters:
signature
- signature stringclient
- true for the client-to-server command, false for the server-to-client command
-
SignatureCommand
public SignatureCommand(boolean client)
Encoding constructor for signature requests.- Parameters:
client
- true for the client command, false for the server command
-
-
Method Detail
-
toString
public java.lang.String toString()
Description copied from class:ComPortCommand
Get the human-readable description of this option.- Specified by:
toString
in classComPortCommand
-
visit
public void visit(ComPortCommandSwitch sw)
Description copied from class:ComPortCommand
Apply visitor pattern.- Specified by:
visit
in classComPortCommand
- Parameters:
sw
- visitor switch handler
-
getSignature
public java.lang.String getSignature()
-
decodeFailed
public boolean decodeFailed()
-
-