code: private IChemFile readChemFile(IChemFile cf) throws CDKException {
          // have to do stuff here
          try {
              String line = null;
              while ((line = input.readLine()) != null) {
                  if (line.startsWith("INChI=") || line.startsWith("InChI=")) {
                      // ok, the fun starts
                      cf = cf.getBuilder().newInstance(IChemFile.class);
                      // ok, we need to parse things like:
                      // INChI=1.12Beta/C6H6/c1-2-4-6-5-3-1/h1-6H
                      final String INChI = line.substring(6);
                      StringTokenizer tokenizer = new StringTokenizer(INChI, "/");
                      // ok, we expect 4 tokens
                      tokenizer.nextToken(); // 1.12Beta not stored since never used
                      final String formula = tokenizer.nextToken(); // C6H6
                      String connections = null;
                      if (tokenizer.hasMoreTokens()) {
                          connections = tokenizer.nextToken().substring(1); // 1-2-4-6-5-3-1
                      }
                      //final String hydrogens = tokenizer.nextToken().substring(1); // 1-6H
  
                      IAtomContainer parsedContent = inchiTool.processFormula(
                              cf.getBuilder().newInstance(IAtomContainer.class), formula);
                      if (connections != null)
                          inchiTool.processConnections(connections, parsedContent, -1);
  
                      IAtomContainerSet moleculeSet = cf.getBuilder().newInstance(IAtomContainerSet.class);
                      moleculeSet.addAtomContainer(cf.getBuilder().newInstance(IAtomContainer.class, parsedContent));
                      IChemModel model = cf.getBuilder().newInstance(IChemModel.class);
                      model.setMoleculeSet(moleculeSet);
                      IChemSequence sequence = cf.getBuilder().newInstance(IChemSequence.class);
                      sequence.addChemModel(model);
                      cf.addChemSequence(sequence);
                  }
              }
          } catch (IOException | IllegalArgumentException exception) {
              exception.printStackTrace();
              throw new CDKException("Error while reading INChI file: " + exception.getMessage(), exception);
          }
          return cf;
      }
docs: Reads a ChemFile object from input.
  
  @return ChemFile with the content read from the input