code: public static final LockFile newLockFile(final String path)
      throws FileCanonicalizationException, FileSecurityException {
  
          LockFile lockFile = newNIOLockFile();
  
          if (lockFile == null) {
              lockFile = new LockFile();
          }
  
          lockFile.setPath(path);
  
          return lockFile;
      }
docs: Retrieves a <tt>LockFile</tt> instance, initialized with a <tt>File</tt>
  object whose path is the canonical form of the one specified by the
  given <tt>path</tt> argument. <p>
  
  The resulting <tt>LockFile</tt> instance does not yet hold a lock
  condition on the file with the given path, nor does it guarantee that the
  file pre-exists or is created.
  
  However, upon successful execution, it is guaranteed that all required
  parent directories have been created and that the underlying platform has
  verified the specified path is legal on the file system of the underlying
  storage partition.
  
  @return a <tt>LockFile</tt> instance initialized with a <tt>File</tt>
  object whose path is the one specified by the given <tt>path</tt>
  argument.
  @param path the path of the <tt>File</tt> object with which the retrieved
  <tt>LockFile</tt> object is to be initialized
  @throws FileCanonicalizationException if an I/O error occurs upon
  canonicalization of the given path, which is possible because
  it may be illegal on the runtime file system or because
  construction of the canonical path name may require native file
  system queries
  @throws FileSecurityException if a required system property value cannot
  be accessed, or if a security manager exists and its <tt>{@link
  java.lang.SecurityManager#checkRead}</tt> method denies read
  access to the file; or if its <tt>{@link
  java.lang.SecurityManager#checkRead(java.lang.String)}</tt>
  method does not permit verification of the existence of all
  necessary parent directories; or if the <tt>{@link
  java.lang.SecurityManager#checkWrite(java.lang.String)}</tt>
  method does not permit all necessary parent directories to be
  created