bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java FileOutputStream Methods

FileOutputStream Methods

The FileOutputStream class provides methods to write data (as bytes) to a file:

MethodDescriptionReturn Type
close()Closes the stream and releases system resourcesvoid
flush()Flushes the stream - forces any buffered output bytes to be written immediatelyvoid
write()Writes one byte, an array of bytes, or part of an array to the filevoid
getFD()Returns the file descriptor object associated with the streamFileDescriptor
getChannel()Returns the unique FileChannel object for this streamFileChannel

Related Pages

Java I/O Streams Tutorial

Previous

Java FileInputStream Methods

Next

Java BufferedReader Methods