Package com.thaiopensource.validate.auto
Class RewindableReader
- java.lang.Object
-
- java.io.Reader
-
- com.thaiopensource.validate.auto.RewindableReader
-
- All Implemented Interfaces:
Rewindable
,java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
public class RewindableReader extends java.io.Reader implements Rewindable
Rewindable implementation over a reader. Modified from RewindableInputStream by replacing the input stream with a reader.- Author:
- george
-
-
Constructor Summary
Constructors Constructor Description RewindableReader(java.io.Reader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRewind()
void
close()
int
read()
int
read(char[] b, int off, int len)
void
rewind()
void
willNotRewind()
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.io.Reader
- Throws:
java.io.IOException
-
rewind
public void rewind()
- Specified by:
rewind
in interfaceRewindable
-
canRewind
public boolean canRewind()
- Specified by:
canRewind
in interfaceRewindable
-
willNotRewind
public void willNotRewind()
- Specified by:
willNotRewind
in interfaceRewindable
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjava.io.Reader
- Throws:
java.io.IOException
-
read
public int read(char[] b, int off, int len) throws java.io.IOException
- Specified by:
read
in classjava.io.Reader
- Throws:
java.io.IOException
-
-