|
SSH Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.telnet.TelnetOption
public class TelnetOption
TelnetOption class enables developers to implement and use existing and
future telnet protocol options. The framework is specified in RFC 855 and
standard options are specified in separate RFC documents.
Notes for subclassing:
For some options (i.e. ECHO or BINARY), it is enough to pass an option code
to the constructor to be able to use it. Many options, however, use
subnegotiation and the TelnetOption class should be subclassed. For those
options requiring subnegotiation the option class should set optionCode
in constructor and override methods readSubnegotation
and
writeSubnegotiation
for formatting/parsing option specific data.
Constructor Summary | |
---|---|
TelnetOption(int optionCode)
Creates a new TelnetOption instance. |
Method Summary | |
---|---|
int |
getOptionCode()
Gets option code. |
java.lang.String |
getOptionName()
Gets name of this option based on its option code. |
void |
readSubnegotiation(java.io.InputStream in)
Reads subnegotiation data for this TelnetOption By default this method is empty and and is intended for use in subclasses requiring option negotiation. |
void |
writeSubnegotiation(java.io.OutputStream out)
Writes subnegotiation data for this TelnetOption. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TelnetOption(int optionCode)
0 - BINARY
Negotiates transmission of binary data
1 - ECHO
Negotiates echoing of data exchanged
24 - TERMINAL TYPE
Negotiates terminal display options
optionCode
- the option codeMethod Detail |
---|
public int getOptionCode()
public void writeSubnegotiation(java.io.OutputStream out) throws java.io.IOException
out
- the OutputStream to write data to.
java.io.IOException
- if an I/O related error occurs.public void readSubnegotiation(java.io.InputStream in) throws java.io.IOException
in
- the InputStream to read from
java.io.IOException
- if an I/O related error occurspublic java.lang.String getOptionName()
|
SSH Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |