aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "File Descriptor" Watch "File Descriptor" New topic
Author

File Descriptor

Steven Wong
Ranch Hand

Joined: Mar 07, 2002
Posts: 295
Hi,
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");
...
...
Thanks


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

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

http://mindprod.com/io10.html
Good Luck.
Mario


<a href="http://www.ajmasters.com" target="_blank" rel="nofollow">http://www.ajmasters.com</a> Real Estate, Tampa Florida
Steven Wong
Ranch Hand

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

public static void main(String a[])
{
try
{
FileDescriptor fd = new FileDescriptor();
FileInputStream fI = new FileInputStream(fd.in);
FileOutputStream fO = new FileOutputStream(fd.out);
int c;
while((c=fI.read()) != -1)
{
fO.write(c);
}
}
catch(IOException e){e.printStackTrace();}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Descriptor