ORO, Inc. Logo  All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oroinc.net.telnet.TelnetClient

java.lang.Object
   |
   +----com.oroinc.net.SocketClient
           |
           +----com.oroinc.net.telnet.Telnet
                   |
                   +----com.oroinc.net.telnet.TelnetClient

public class TelnetClient
extends Telnet
The TelnetClient class implements the simple network virtual terminal (NVT) for the Telnet protocol according to RFC 854. It does not implement any of the extra Telnet options because it is meant to be used within a Java program providing automated access to Telnet accessible resources. A telnet client implementing extra options and meant for use with a terminal emulator can be found in NetComponents Pro TM

The class can be used by first connecting to a server using the SocketClient connect method. Then an InputStream and OutputStream for sending and receiving data over the Telnet connection can be obtained by using the getInputStream() and getOutputStream() methods. When you finish using the streams, you must call disconnect rather than simply closing the streams.

Copyright © 1997 Original Reusable Objects, Inc. All rights reserved.


Constructor Index

 o TelnetClient()
Default TelnetClient constructor.

Method Index

 o _connectAction_()
Handles special connection requirements.
 o disconnect()
Disconnects the telnet session, closing the input and output streams as well as the socket.
 o getInputStream()
Returns the telnet connection input stream.
 o getOutputStream()
Returns the telnet connection output stream.

Constructors

 o TelnetClient
 public TelnetClient()
Default TelnetClient constructor.

Methods

 o _connectAction_
 protected void _connectAction_() throws IOException
Handles special connection requirements.

Throws: IOException
If an error occurs during connection setup.
Overrides:
_connectAction_ in class Telnet
 o disconnect
 public void disconnect() throws IOException
Disconnects the telnet session, closing the input and output streams as well as the socket. If you have references to the input and output streams of the telnet connection, you should not close them yourself, but rather call disconnect to properly close the connection.

Overrides:
disconnect in class SocketClient
 o getOutputStream
 public OutputStream getOutputStream()
Returns the telnet connection output stream. You should not close the stream when you finish with it. Rather, you should call disconnect .

Returns:
The telnet connection output stream.
 o getInputStream
 public InputStream getInputStream()
Returns the telnet connection input stream. You should not close the stream when you finish with it. Rather, you should call disconnect .

Returns:
The telnet connection input stream.

ORO, Inc. Logo  All Packages  Class Hierarchy  This Package  Previous  Next  Index