Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any help for FileDescriptor ??

 
Tejas Tambe
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Tejas Tambe
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx val
it really helped me a lot!
Tejas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic