|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.URLConnection | +--thor.net.TelnetURLConnection
This is class creates a Telnet connection from a telnet URL, see the thor.app classes for examples. The LGPL applies to this software. Unless otherwise stated the software is Copyright 1996,2000 Daniel Kristjansson
Field Summary |
Fields inherited from class java.net.URLConnection |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
Fields inherited from interface thor.net.TelnetConstants |
AO, AYT, BEL, BRK, BS, CR, DM, DO, DONT, EC, EL, END_OF_RECORD, FF, GA, HT, IAC, IP, LF, NOP, NULL, OUTMRK, SB, SE, TERMINAL_TYPE, TUID, VT, WILL, WONT |
Constructor Summary | |
TelnetURLConnection(java.net.URL poURL)
Creates a TelnetURLConnection object, call connect before using. |
Method Summary | |
void |
connect()
This actually connects to the host at the specified port. |
boolean |
connected()
If true telnet session is currently open. |
void |
disconnect()
Disconnect from the host. |
java.io.InputStream |
getInputStream()
Fetches the InputStream from the host. |
java.io.OutputStream |
getOutputStream()
Fetches the OutputStream to the host. |
TelnetTerminalHandler |
getTelnetTerminalHandler()
Returns the TelnetTerminalHandler currently in use. |
void |
sendCommand(int command,
int option)
Bypasses the escapes of IAC in the OutputStream and sends a command of the form [IAC,command,option] Use with caution. |
void |
setTelnetTerminalHandler(TelnetTerminalHandler poHandler)
This allows you to set your own TelnetTerminalHandler. |
void |
updateOptions()
Call this to get options negotiated |
Methods inherited from class java.net.URLConnection |
addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TelnetURLConnection(java.net.URL poURL)
Method Detail |
public void connect() throws java.io.IOException
connect
in class java.net.URLConnection
java.io.IOException
public void disconnect() throws java.io.IOException
java.io.IOException
public boolean connected()
public java.io.OutputStream getOutputStream()
getOutputStream
in class java.net.URLConnection
public java.io.InputStream getInputStream()
The DefaultTelnetTerminalHandler handles options gracefully, but doesn't handle the LF, CR, etc at all. See the examples in thor.app for examples on how to handle these.
getInputStream
in class java.net.URLConnection
public void setTelnetTerminalHandler(TelnetTerminalHandler poHandler)
public TelnetTerminalHandler getTelnetTerminalHandler()
public void sendCommand(int command, int option) throws java.io.IOException
java.io.IOException
public void updateOptions()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |