Package com.thaiopensource.validate.auto
Class RewindableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.thaiopensource.validate.auto.RewindableInputStream
-
- All Implemented Interfaces:
Rewindable,Closeable,AutoCloseable
public class RewindableInputStream extends InputStream implements Rewindable
-
-
Constructor Summary
Constructors Constructor Description RewindableInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()booleancanRewind()voidclose()intread()intread(byte[] b, int off, int len)voidrewind()voidwillNotRewind()-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
RewindableInputStream
public RewindableInputStream(InputStream in)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
rewind
public void rewind()
- Specified by:
rewindin interfaceRewindable
-
canRewind
public boolean canRewind()
- Specified by:
canRewindin interfaceRewindable
-
willNotRewind
public void willNotRewind()
- Specified by:
willNotRewindin interfaceRewindable
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
-