Class socket.TelnetIO
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class socket.TelnetIO

java.lang.Object
   |
   +----socket.TelnetIO

public class TelnetIO
extends Object
implements StatusPeer
Implements simple telnet io
Version:
$Id: TelnetIO.java,v 1.10 1998/02/09 10:22:18 leo Exp $
Author:
Matthias L. Jugel, Marcus Meißner

Constructor Index

 o TelnetIO()

Method Index

 o available()
Returns bytes available to be read.
 o connect(String)
Connect to the remote host at the default telnet port (23).
 o connect(String, int)
Connect to the remote host at the specified port.
 o disconnect()
Disconnect from remote host.
 o notifyStatus(Vector)
Notify about current telnet status.
 o receive()
Read data from the remote host.
 o send(byte)
 o send(byte[])
Send data to the remote host.
 o setPeer(StatusPeer)
Set the object to be notified about current status.
 o toString()
Return the version of TelnetIO.

Constructors

 o TelnetIO
  public TelnetIO()

Methods

 o toString
  public String toString()
Return the version of TelnetIO.
Overrides:
toString in class Object
 o connect
  public void connect(String address,
                      int port) throws IOException
Connect to the remote host at the specified port.
Parameters:
address - the symbolic host address
port - the numeric port
See Also:
disconnect
 o disconnect
  public void disconnect() throws IOException
Disconnect from remote host.
See Also:
connect
 o connect
  public void connect(String address) throws IOException
Connect to the remote host at the default telnet port (23).
Parameters:
address - the symbolic host address
 o setPeer
  public void setPeer(StatusPeer obj)
Set the object to be notified about current status.
Parameters:
obj - object to be notified.
 o available
  public int available() throws IOException
Returns bytes available to be read. Since they haven't been negotiated over, this could be misleading. Most useful as a boolean value - "are any bytes available" - rather than as an exact count of "how many ara available."
Throws: IOException
on problems with the socket connection
 o receive
  public byte[] receive() throws IOException
Read data from the remote host. Blocks until data is available. Returns an array of bytes.
See Also:
send
 o send
  public void send(byte buf[]) throws IOException
Send data to the remote host.
Parameters:
buf - array of bytes to send
See Also:
receive
 o send
  public void send(byte b) throws IOException
 o notifyStatus
  public Object notifyStatus(Vector status)
Notify about current telnet status. This method is called top-down.
Parameters:
status - contains status information

All Packages  Class Hierarchy  This Package  Previous  Next  Index