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();
                       
          DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {            
              @Override
              public boolean accept(Path entry) throws IOException {
                  String path = entry.toAbsolutePath().toString().toLowerCase();
                  if(path.equals(fileNamePrefix+".shx")){
                      shxFile = entry.toFile();
                      return true;
                  }
                  else if(path.equals(fileNamePrefix+".dbf")){
                      dbfFile = entry.toFile();
                      return true;
                  }
                  else if(path.equals(fileNamePrefix+".prj")){
                      prjFile = entry.toFile();
                      return true;
                  }
                  return false;
              }
  
          };
          
          try (DirectoryStream<Path> stream = Files.newDirectoryStream(shpFile.getParentFile().toPath(), filter)) {            
              for (Path pathDir : stream) {                
                 //Do nothing   
              } 
          }
          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