Java FileOutputStream getFD() MethodThe getFD() method of Java FileOutputStream class is used to get the FileDescriptor associated with this stream. SyntaxParameterNA Return ValueThis method returns the file descriptor associated with this file output stream. ExceptionIOException - If any I/O error occurs. Example 1Java 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 ---->java.io.FileDescriptor@43a25848 Example 2Java Program to get the File Descriptor. Output: Enter a string to get the File Descriptor ------> Sasasda file descriptor is ---->java.io.FileDescriptor@43a25848.
Next TopicJava FileOutputStream Class
|