This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes File Descriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "File Descriptor" Watch "File Descriptor" New topic

File Descriptor

Steven Wong
Ranch Hand

Joined: Mar 07, 2002
Posts: 295
Can anyone show me how to make use of a FileDescriptor?
For eg. how do I replace it for the parameter of the FileInputStream constructor?
FileInputStream inputStream = new FileInputStream("C:/test.txt");

best regards,<br />Steven<br />SCJP, SCEA
Mario Levesque
Ranch Hand

Joined: Nov 01, 2000
Posts: 51
I'm not too sure about what you are asking exactly, however I found this on the web that might help you.
Good Luck.

<a href="" target="_blank" rel="nofollow"></a> Real Estate, Tampa Florida
Steven Wong
Ranch Hand

Joined: Mar 07, 2002
Posts: 295
I got it oredi, Mario.

public static void main(String a[])
FileDescriptor fd = new FileDescriptor();
FileInputStream fI = new FileInputStream(;
FileOutputStream fO = new FileOutputStream(fd.out);
int c;
while(( != -1)
catch(IOException e){e.printStackTrace();}
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: File Descriptor
Similar Threads
getting inputstream null for the xml xml file outside workspace
need help!!! please
File path \\ //
EOF in FileInputStreams