code: private long write(long offset, ByteBuffer inputBuf) throws IOException {
      int inputBufLength = inputBuf.limit() - inputBuf.position();
      MappedByteBuffer outputBuf =
          mLocalFileChannel.map(FileChannel.MapMode.READ_WRITE, offset, inputBufLength);
      outputBuf.put(inputBuf);
      int bytesWritten = outputBuf.limit();
      BufferUtils.cleanDirectBuffer(outputBuf);
      return bytesWritten;
    }
docs: Writes data to the block from an input {@link ByteBuffer}.
  
  @param offset starting offset of the block file to write
  @param inputBuf {@link ByteBuffer} that input data is stored in
  @return the size of data that was written