wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Any help for FileDescriptor ??" Watch "Any help for FileDescriptor ??" New topic
Author

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
Sheriff

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
http://java.sun.com/j2se/1.3/docs/api/java/io/class-use/FileDescriptor.html
I wouldn't put to much effort in that, though ...
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
[This message has been edited by Valentin Crettaz (edited December 21, 2001).]


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[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!
Tejas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Any help for FileDescriptor ??
 
Similar Threads
how to get a filename with fileoutputstream
FileDescriptor
what exactly System.in is ?
FileDescriptor
FileWriter.write(String str)