jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Any help for FileDescriptor ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Any help for FileDescriptor ??" Watch "Any help for FileDescriptor ??" New topic

Any help for FileDescriptor ??

Tejas Tambe
Ranch Hand

Joined: Oct 08, 2001
Posts: 47
what is a FileDescriptor ??
How to use it, and what are it's uses ???
How do i create a FileDescriptor object pointing to particular file ?
{(As there is only one empty constructor for it.)
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
From the API

Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes. The main practical use for a file descriptor is to create a FileInputStream or FileOutputStream to contain it.
Applications should not create their own file descriptors

File descriptors should be obtained via a method call like getFD() of class RandomAccessFile or similar methods in SocketImpl or DatagramSocketImpl. A file descriptor is used to initialize a FileInputStream and/or a FileOutputStream.
Here is the doc about the class-use of FileDescriptor
I wouldn't put to much effort in that, though ...
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
[This message has been edited by Valentin Crettaz (edited December 21, 2001).]

[Blog] [Blogroll] [My Reviews] My Linked In
Tejas Tambe
Ranch Hand

Joined: Oct 08, 2001
Posts: 47
Thanx val
it really helped me a lot!
I agree. Here's the link: http://aspose.com/file-tools
subject: Any help for FileDescriptor ??
jQuery in Action, 3rd edition