Class TFileInputStream
java.lang.Object
java.io.InputStream
de.mirkosertic.bytecoder.classlib.java.io.TFileInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final FileDescriptorprivate final StringThe path of the referenced file (null if the stream is created with a file descriptor) -
Constructor Summary
ConstructorsConstructorDescriptionTFileInputStream(File file) TFileInputStream(FileDescriptor fdObj) TFileInputStream(String name) -
Method Summary
Modifier and TypeMethodDescriptionintprivate intvoidclose()final FileDescriptorgetFD()private voidOpens the specified file for reading.private intopen0(FileDescriptor fd, String name) Opens the specified file for reading.intread()intread(byte[] b) intread(byte[] b, int off, int len) private intread0(FileDescriptor fd) private intreadBytes(FileDescriptor df, byte[] b, int off, int len) longskip(long n) private longskip0(FileDescriptor fd, int n) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
fd
-
path
The path of the referenced file (null if the stream is created with a file descriptor) -
closed
private volatile boolean closed
-
-
Constructor Details
-
TFileInputStream
- Throws:
FileNotFoundException
-
TFileInputStream
- Throws:
FileNotFoundException
-
TFileInputStream
-
-
Method Details
-
open0
Opens the specified file for reading.- Parameters:
name- the name of the file- Throws:
FileNotFoundException
-
open
Opens the specified file for reading.- Parameters:
name- the name of the file- Throws:
FileNotFoundException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read0
- Throws:
IOException
-
readBytes
- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
skip0
- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
available0
- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
getFD
- Throws:
IOException
-