code: public void initDriverFromFile(File shpFile, String forceEncoding) throws IOException {             // Read columns from files metadata
          this.shpFile = shpFile;
  
          if (!shpFile.exists()) {
              throw new FileNotFoundException("The following file does not exists: " + shpFile.getPath());
          }
          // Find appropriate file extension for shx and dbf, maybe SHX or Shx..
          //String shxFileName = shpFile.getName();
  
          String fileName = shpFile.getAbsolutePath();
          final int dotIndex = fileName.lastIndexOf('.');
          final String fileNamePrefix = fileName.substring(0, dotIndex).toLowerCase();
  
          File tmpFile = new File(fileNamePrefix + ".shx");
          if (tmpFile.exists())
              shxFile = tmpFile;
          tmpFile = new File(fileNamePrefix + ".dbf");
          if (tmpFile.exists())
              dbfFile = tmpFile;
          tmpFile = new File(fileNamePrefix + ".prj");
          if (tmpFile.exists())
              prjFile = tmpFile;
  
          if (dbfFile != null) {
              dbfDriver.initDriverFromFile(dbfFile, forceEncoding);
          } else {
              throw new IllegalArgumentException("DBF File not found");
          }
          if (shxFile == null) {
              throw new IllegalArgumentException("SHX File not found");
          }
          FileInputStream shpFis = new FileInputStream(shpFile);
          shapefileReader = new ShapefileReader(shpFis.getChannel());
          FileInputStream shxFis = new FileInputStream(shxFile);
          shxFileReader = new IndexFile(shxFis.getChannel());
      }
docs: Init this driver from existing files, then open theses files.
  @param shpFile Shape file path.
  @param forceEncoding If defined use this encoding instead of the one defined in dbf header.
  @throws IOException