public PathImpl createTempFile(String prefix,String suffix) throws IOException {
  if (prefix == null || prefix.length() == 0)   prefix="t";
  if (suffix == null)   suffix=".tmp";
synchronized (LOCK) {
    for (int i=0; i < 32768; i++) {
      int r=Math.abs((int)RandomUtil.getRandomLong());
      PathImpl file=lookup(prefix + r + suffix);
      if (file.createNewFile())       return file;
    }
  }
  throw new IOException("cannot create temp file");
}

public PathImpl createTempFile ( String prefix , String suffix ) throws IOException { if ( prefix == null || prefix . length ( ) == 0 ) prefix = "t" ; if ( suffix == null ) suffix = ".tmp" ; synchronized ( LOCK ) { for ( int i = 0 ; i < 32768 ; i ++ ) { int r = Math . abs ( ( int ) RandomUtil . getRandomLong ( ) ) ; PathImpl file = lookup ( prefix + r + suffix ) ; if ( file . createNewFile ( ) ) return file ; } } throw new IOException ( "cannot create temp file" ) ; }
creates a unique temporary file as a child of this directory .
