public PidFile(final File directory,final String filename) throws FileNotFoundException {
  if (!directory.isDirectory() && directory.exists()) {
    throw new IllegalArgumentException("Argument '" + directory + "' must be an existing directory!");
  }
  final File file=new File(directory,filename);
  if (!file.exists() || file.isDirectory()) {
    throw new FileNotFoundException("Unable to find PID file '" + filename + "' in directory "+ directory);
  }
  this.pidFile=file;
}

public PidFile ( final File directory , final String filename ) throws FileNotFoundException { if ( ! directory . isDirectory ( ) && directory . exists ( ) ) { throw new IllegalArgumentException ( "Argument '" + directory + "' must be an existing directory!" ) ; } final File file = new File ( directory , filename ) ; if ( ! file . exists ( ) || file . isDirectory ( ) ) { throw new FileNotFoundException ( "Unable to find PID file '" + filename + "' in directory " + directory ) ; } this . pidFile = file ; }
constructs a pidfile for reading pid stored in a file .
