Java FileOutputStream getChannel() MethodJava getChannel() method of FileOutputStream class is used to get the unique FileChannel object associated with this file output stream. SyntaxParameterNA Return ValueThis method returns the file channel associated with this file output stream. ExceptionNA Example 1Java program to get the file channel Output: Enter a string to get the file channel------> ashu String that is stored in the JavaTpoint Txt file ------>ashu file channel associated with this stream is----->sun.nio.ch.FileChannelImpl@30c7da1e Example 2Java Program to get the file channel Output: Enter a string to get the file channel------> ashu file channel associated with this stream is----->sun.nio.ch.FileChannelImpl@30c7da1e
Next TopicJava FileOutputStream Class
|