Java FileOutputStream Methods
FileOutputStream Methods
The FileOutputStream
class provides methods to write data (as bytes) to a file:
Method | Description | Return Type |
---|---|---|
close() | Closes the stream and releases system resources | void |
flush() | Flushes the stream - forces any buffered output bytes to be written immediately | void |
write(int b) write(byte[] b) write(byte[] b, int off, int len) |
Writes one byte, an array of bytes, or part of an array to the file | void |
getFD() | Returns the file descriptor object associated with the stream | FileDescriptor |
getChannel() | Returns the unique FileChannel object for this stream |
FileChannel |
Related Pages
Java FileOutputStream Tutorial