Package com.saperion.ngc.util
Class BlockStream
java.lang.Object
java.io.InputStream
com.saperion.ngc.util.BlockStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A stream that keeps a certain part of it's data in a byte-array to provide fast access with the
possibility to go forward and backward on this block.
- Author:
- rbo
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BlockStream
Constructor.- Parameters:
in- Input streamtheBlockSize- size of the block to hold in memory- Throws:
IOException- when the block could not be filled
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException- See Also:
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException- See Also:
-
available
- Overrides:
availablein classInputStream- Throws:
IOException- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- See Also:
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException- See Also:
-