code: public void close() throws IOException {
          guard.close();
          synchronized (this) {
              if (channel != null && channel.isOpen()) {
                  channel.close();
  
                  // j2objc: since a @RetainedWith field cannot be reassigned, the following line is
                  // commented out. If a channel is already closed, the predicate above will be false
                  // and so this branch will not be taken. FileInputStream and FileOutputStream
                  // simply call channel.close() when channel is not null witout even checking if
                  // it's still open (and that's ok).
                  // channel = null;
              }
              IoUtils.close(fd);
          }
      }
docs: Closes this file.
  
  @throws IOException
  if an error occurs while closing this file.