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:
read
in classInputStream
- Throws:
IOException
- See Also:
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
- See Also:
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
- See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- See Also:
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
- See Also:
-