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 boolean
private final FileDescriptor
private final String
The 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 TypeMethodDescriptionint
private int
void
close()
final FileDescriptor
getFD()
private void
Opens the specified file for reading.private int
open0
(FileDescriptor fd, String name) Opens the specified file for reading.int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) private int
read0
(FileDescriptor fd) private int
readBytes
(FileDescriptor df, byte[] b, int off, int len) long
skip
(long n) private long
skip0
(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:
read
in classInputStream
- Throws:
IOException
-
read0
- Throws:
IOException
-
readBytes
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
skip0
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
available0
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
getFD
- Throws:
IOException
-