public abstract SeekableByteChannel newByteChannel (Path path, Set<? extends OpenOption> options, FileAttribute<?>… attrs) throws IOException

Opens or creates a file, returning a seekable byte channel to access the file. This method works in exactly the manner specified by the Files.newByteChannel(Path,Set,FileAttribute[]) method.

Parameters:
path     the path to the file to open or create
options     options specifying how the file is opened
attrs     an optional list of file attributes to set atomically when creating the file

Returns:  a new seekable byte channel

Exceptions:
IllegalArgumentException     if the set contains an invalid combination of options
UnsupportedOperationException     if an unsupported open option is specified or the array contains attributes that cannot be set atomically when creating the file
FileAlreadyExistsException     if a file of that name already exists and the CREATE_NEW option is specified (optional specific exception)
IOException     if an I/O error occurs
SecurityException     In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the path if the file is opened for reading. The SecurityManager.checkWrite(String) method is invoked to check write access to the path if the file is opened for writing. The checkDelete method is invoked to check delete access if the file is opened with the DELETE_ON_CLOSE option.