Class ZeroFsInputStream
java.lang.Object
java.io.InputStream
io.roastedroot.zerofs.ZeroFsInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
InputStream for reading from a file's RegularFile.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) RegularFileprivate final FileSystemStateprivate booleanprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprivate voidvoidclose()private booleanisOpen()intread()intread(byte[] b) intread(byte[] b, int off, int len) private intreadInternal(byte[] b, int off, int len) private static intsaturatedCast(long value) longskip(long n) Methods inherited from class InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
Field Details
-
file
RegularFile file -
pos
private long pos -
finished
private boolean finished -
fileSystemState
-
-
Constructor Details
-
ZeroFsInputStream
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
readInternal
- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
saturatedCast
private static int saturatedCast(long value) -
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
checkNotClosed
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
isOpen
private boolean isOpen()
-