sdsu.io
Class SimpleReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--sdsu.io.SimpleReader
- public class SimpleReader
- extends java.io.FilterReader
- implements java.lang.Cloneable
Allows you to read to the EOF with one method. Useful in reading
the entire contents of a file.
- Version:
- 1 25 August 1997
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
Method Summary |
java.lang.String |
contents()
Returns the entire contents (to EOF) of the input stream. |
void |
setReadSize(int readSize)
Set the number of characters that will be read at one time by
contents. |
Methods inherited from class java.io.FilterReader |
close,
mark,
markSupported,
read,
read,
ready,
reset,
skip |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SimpleReader
public SimpleReader(java.io.Reader in)
SimpleReader
public SimpleReader(java.io.InputStream in)
contents
public java.lang.String contents()
throws java.io.IOException
- Returns the entire contents (to EOF) of the input stream.
setReadSize
public void setReadSize(int readSize)
- Set the number of characters that will be read at one time by
contents. Larger values reduce the number of reads required.
Default value is 512.