Class TFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- de.mirkosertic.bytecoder.classlib.java.io.TFileInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class TFileInputStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description TFileInputStream(java.io.File file)
TFileInputStream(java.io.FileDescriptor fdObj)
TFileInputStream(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
private int
available0(java.io.FileDescriptor fd)
void
close()
java.io.FileDescriptor
getFD()
private void
open(java.lang.String name)
Opens the specified file for reading.private int
open0(java.io.FileDescriptor fd, java.lang.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(java.io.FileDescriptor fd)
private int
readBytes(java.io.FileDescriptor df, byte[] b, int off, int len)
long
skip(long n)
private long
skip0(java.io.FileDescriptor fd, int n)
-
-
-
Constructor Detail
-
TFileInputStream
public TFileInputStream(java.lang.String name) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
TFileInputStream
public TFileInputStream(java.io.File file) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
TFileInputStream
public TFileInputStream(java.io.FileDescriptor fdObj)
-
-
Method Detail
-
open0
private int open0(java.io.FileDescriptor fd, java.lang.String name) throws java.io.FileNotFoundException
Opens the specified file for reading.- Parameters:
name
- the name of the file- Throws:
java.io.FileNotFoundException
-
open
private void open(java.lang.String name) throws java.io.FileNotFoundException
Opens the specified file for reading.- Parameters:
name
- the name of the file- Throws:
java.io.FileNotFoundException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read0
private int read0(java.io.FileDescriptor fd) throws java.io.IOException
- Throws:
java.io.IOException
-
readBytes
private int readBytes(java.io.FileDescriptor df, byte[] b, int off, int len) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip0
private long skip0(java.io.FileDescriptor fd, int n) throws java.io.IOException
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available0
private int available0(java.io.FileDescriptor fd) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
getFD
public final java.io.FileDescriptor getFD() throws java.io.IOException
- Throws:
java.io.IOException
-
-