Create or overwrite file on indicated path and returns an output stream for writing into the file.
@param f the file name to open
@param createFlag gives the semantics of create; see {@link CreateFlag}
@param opts file creation options; see {@link Options.CreateOpts}.
- Progress - to report progress on the operation - default null
- Permission - umask is applied against permisssion: default is FsPermissions:getDefault()
- CreateParent - create missing parent path; default is to not to create parents
- The defaults for the following are SS defaults of the file server implementing the target path. Not all parameters make sense for all kinds of file system - eg. localFS ignores Blocksize, replication, checksum
- BufferSize - buffersize used in FSDataOutputStream
- Blocksize - block size for file blocks
- ReplicationFactor - replication for blocks
- ChecksumParam - Checksum parameters. server default is used if not specified.
@return {@link FSDataOutputStream} for created file
@throws AccessControlException If access is denied
@throws FileAlreadyExistsException If file
f
already exists
@throws FileNotFoundException If parent of
f
does not existand
createParent
is false
@throws ParentNotDirectoryException If parent of
f
is not adirectory.
@throws UnsupportedFileSystemException If file system for
f
isnot supported
@throws IOException If an I/O error occurredExceptions applicable to file systems accessed over RPC:
@throws RpcClientException If an exception occurred in the RPC client
@throws RpcServerException If an exception occurred in the RPC server
@throws UnexpectedServerException If server implementation throwsundeclared exception to RPC server RuntimeExceptions:
@throws InvalidPathException If path
f
is not valid