code: public void close() throws IOException {
      try {
        if (OGlobalConfiguration.FILE_LOCK.getValueAsBoolean())
          unlock();
        if (channel != null && channel.isOpen()) {
          channel.close();
          channel = null;
        }
  
        if (accessFile != null) {
          accessFile.close();
          accessFile = null;
        }
  
      } catch (Exception e) {
        OLogManager.instance().error(this, "Error on closing file " + osFile.getAbsolutePath(), e, OIOException.class);
      }
    }
docs: /*
  (non-Javadoc)
  
  @see com.orientechnologies.orient.core.storage.fs.OFileAAA#close()