DCT Lightfoot v3 API specification

java.io
Class Reader

java.lang.Object
  |
  +--java.io.Reader
Direct Known Subclasses:
InputStreamReader

public abstract class Reader
extends Object

Read character streams


Field Summary
protected  Object lock
          The lock to use
 
Constructor Summary
protected Reader()
          Create a reader synchronising on this object
protected Reader(Object lock)
          Create a reader synchronising on the lock
 
Method Summary
abstract  void close()
          close the stream
 void mark(int limit)
          mark the stream
 boolean markSupported()
          Test if mark is supported
 int read()
          Read a character
 int read(char[] c)
          Read into a character array
abstract  int read(char[] c, int off, int len)
          Read into a character array
 boolean ready()
          Test if it is available for reading
 void reset()
          reset the stream
 long skip(long n)
          Skip a number of characters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

protected Object lock
The lock to use

Constructor Detail

Reader

protected Reader()
Create a reader synchronising on this object


Reader

protected Reader(Object lock)
Create a reader synchronising on the lock

Parameters:
lock - The lock to use
Method Detail

close

public abstract void close()
                    throws IOException
close the stream

Throws:
IOException - if there is an IO error

mark

public void mark(int limit)
          throws IOException
mark the stream

Parameters:
limit - The read limit
Throws:
IOException - if there is an IO error

markSupported

public boolean markSupported()
Test if mark is supported

Returns:
true if mark is supported

read

public int read()
         throws IOException
Read a character

Returns:
the character
Throws:
IOException - if there is an IO error

read

public int read(char[] c)
         throws IOException
Read into a character array

Parameters:
c - The character array
Returns:
the number of characters read
Throws:
IOException - if there is an IO error

read

public abstract int read(char[] c,
                         int off,
                         int len)
                  throws IOException
Read into a character array

Parameters:
c - The character array
off - The offset
len - The length
Returns:
the number of characters read
Throws:
IOException - if there is an IO error

ready

public boolean ready()
              throws IOException
Test if it is available for reading

Returns:
true if it is
Throws:
IOException - if there is an IO error

reset

public void reset()
           throws IOException
reset the stream

Throws:
IOException - if there is an IO error

skip

public long skip(long n)
          throws IOException
Skip a number of characters

Parameters:
n - The number of characters
Throws:
IOException - if there is an IO error

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification