code: public void close() {
          logger.debug("Try to close accessFile and channel for file: " + osFile);
          if (headerBuffer != null) {
              headerBuffer.force();
              headerBuffer = null;
          }
  
          try {
              unlock();
              if (channel != null && channel.isOpen()) {
                  channel.close();
                  channel = null;
              }
  
              if (accessFile != null) {
                  accessFile.close();
                  accessFile = null;
              }
          } catch (IOException e) {
              e.printStackTrace();
          }
          logger.debug("Closed accessFile and channel for file: " + osFile);
      }
docs: closes all open channels and the file