public static FileChannel openChannel(File file, boolean mutable) throws FileNotFoundException {
    if (mutable) {
      return new RandomAccessFile(file, "rw").getChannel();
    } else {
      return new FileInputStream(file).getChannel();
    }
  }
Open a channel for the given file
@param file
@param mutable
@return
@throws FileNotFoundException
ambry-utils/src/main/java/com/github/ambry/utils/Utils.java