Class RewindableInputStream
java.lang.Object
java.io.InputStream
nu.validator.htmlparser.rewindable.RewindableInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,Rewindable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RewindableInputStream.Blockprivate intIf curBlockAvail > 0, then there are curBlockAvail bytes available to be returned starting at curBlockPos in curBlock.buf.private intprivate booleantrue if we have got an EOF from the underlying InputStreamprivate RewindableInputStream.Blockprivate final InputStreamprivate RewindableInputStream.Blockprivate booleanprivate booleantrue unless willNotRewind has been called -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
head
-
curBlockAvail
private int curBlockAvailIf curBlockAvail > 0, then there are curBlockAvail bytes available to be returned starting at curBlockPos in curBlock.buf. -
curBlock
-
curBlockPos
private int curBlockPos -
lastBlock
-
saving
private boolean savingtrue unless willNotRewind has been called -
in
-
pretendClosed
private boolean pretendClosed -
eof
private boolean eoftrue if we have got an EOF from the underlying InputStream
-
-
Constructor Details
-
RewindableInputStream
-
-
Method Details
-
close
- 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
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-