code: public KeePassFile openDatabase(InputStream keyFileStream) {
          if (keyFileStream == null) {
              throw new IllegalArgumentException("You must provide a non-empty KeePass keyfile stream.");
          }
  
          byte[] protectedBuffer = new KeyFileReader().readKeyFile(keyFileStream);
          return new KeePassDatabaseReader(keepassHeader).decryptAndParseDatabase(protectedBuffer, keepassFile);
      }
docs: Opens a KeePass database with the given keyfile stream and returns the
  KeePassFile for further processing.
  <p>
  If the database cannot be decrypted with the provided keyfile an
  exception will be thrown.
  
  @param keyFileStream
  the keyfile to open the database as stream
  @return a KeePassFile
  @see KeePassFile