Javatpoint Logo
Javatpoint Logo

Java FileOutputStream getFD() Method

The getFD() method of Java FileOutputStream class is used to get the FileDescriptor associated with this stream.

Syntax

Parameter

NA

Return Value

This method returns the file descriptor associated with this file output stream.

Exception

IOException - If any I/O error occurs.

Example 1

Java Program to get the File Descriptor.

Output:

Enter a string to get the File Descriptor ------>
ashu
String that is stored in the JavaTpoint Txt file ------>ashu
file descriptor is ---->[email protected]

Example 2

Java Program to get the File Descriptor.

Output:

Enter a string to get the File Descriptor ------>
Sasasda

file descriptor is ---->[email protected]





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA