Code example for FileNotFoundException

0
        throw new FileAlreadyExistsException("File already exists: "
            + path.toString() 
            + ". Append or overwrite option must be specified in " + flag);
      } 
    } else if (!flag.contains(CREATE)) {
      throw new FileNotFoundException("Non existing file: " + path.toString()
          + ". Create option is not specified in " + flag);
    } 
  } 
}