<<< Creating writeable file with Files.newOutputStream( ) method | Index | Example: BufferedOutputStream, Files.newOutputStream( ) >>> |
Enum java.nio.file.StandardOpenOption provides modes for file opening:
APPEND -- if the file is opened for WRITE access then bytes will be written to the end of the file rather than the beginning.
CREATE -- create a new file if it does not exist.
CREATE_NEW -- create a new file, failing if the file already exists.
DELETE_ON_CLOSE -- delete on close.
DSYNC -- requires that every update to the file's content be written synchronously to the underlying storage device.
READ -- open for read access.
SPARSE -- sparse file.
SYNC -- requires that every update to the file content or metadata be written synchronously to the underlying storage device.
TRUNCATE_EXISTING -- if the file already exists and it is opened for WRITE access, then its length is truncated to 0.
WRITE -- open for write access.
<<< Creating writeable file with Files.newOutputStream( ) method | Index | Example: BufferedOutputStream, Files.newOutputStream( ) >>> |