com.citycolor.net.telnet
Class TelnetReader

java.lang.Object
  extended by java.io.Reader
      extended by com.citycolor.net.telnet.TelnetReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class TelnetReader
extends java.io.Reader

Basic implementation of a telnet input stream. The main characteristic is how it reads complete lines. Telnet streams en the line with a single line feed (ASCII code 10).

Author:
Sebastian E. Ferreyra Pons

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
TelnetReader(java.io.InputStream inputstream)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int i)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] ac, int i, int j)
           
 java.lang.String readLine()
           
 boolean ready()
           
 void reset()
           
 long skip(int i)
           
 
Methods inherited from class java.io.Reader
read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelnetReader

public TelnetReader(java.io.InputStream inputstream)
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
Throws:
java.io.IOException

mark

public void mark(int i)
          throws java.io.IOException
Overrides:
mark in class java.io.Reader
Throws:
java.io.IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.Reader

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.Reader
Throws:
java.io.IOException

skip

public long skip(int i)
          throws java.io.IOException
Throws:
java.io.IOException

ready

public boolean ready()
              throws java.io.IOException
Overrides:
ready in class java.io.Reader
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.Reader
Throws:
java.io.IOException

read

public int read(char[] ac,
                int i,
                int j)
         throws java.io.IOException
Specified by:
read in class java.io.Reader
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Throws:
java.io.IOException


Copyright 1999-2004 Sebastian E. Ferreyra Pons. All Rights Reserved.