new FileInputStream(FileDescriptor fdObj) : FileInputStream « java.io « Java by API






new FileInputStream(FileDescriptor fdObj)

 
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.IOException;
public class Main {
  public static void main(String[] a) {
    File aFile = new File("C:/myFile.text");
    FileInputStream inputFile1 = null; 
    FileDescriptor fd = null; 
    try {
      inputFile1 = new FileInputStream(aFile);
      fd = inputFile1.getFD(); 
    } catch (IOException e) {
      e.printStackTrace(System.err);
      System.exit(1);
    }
    FileInputStream inputFile2 = new FileInputStream(fd);
  }
}

   
  








Related examples in the same category

1.new FileInputStream(File file)
2.new FileInputStream(String name)
3.FileInputStream: available()
4.FileInputStream: close()
5.FileInputStream: getChannel()
6.FileInputStream: getFD()
7.FileInputStream: read()