JBoss VFS 3.0.1.GA

org.jboss.vfs
Class TempFileProvider

java.lang.Object
  extended by org.jboss.vfs.TempFileProvider
All Implemented Interfaces:
Closeable

public final class TempFileProvider
extends Object
implements Closeable

A provider for temporary physical files and directories.

Author:
David M. Lloyd, Ales Justin

Method Summary
 void close()
          Close this provider and delete any temp files associated with it.
static TempFileProvider create(String providerType, ScheduledExecutorService executor)
          Create a temporary file provider for a given type.
 TempDir createTempDir(String originalName)
          Create a temp directory, into which temporary files may be placed.
protected  void finalize()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static TempFileProvider create(String providerType,
                                      ScheduledExecutorService executor)
                               throws IOException
Create a temporary file provider for a given type.

Parameters:
providerType - the provider type string (used as a prefix in the temp file dir name)
executor - the executor
Returns:
the new provider
Throws:
IOException - if an I/O error occurs

createTempDir

public TempDir createTempDir(String originalName)
                      throws IOException
Create a temp directory, into which temporary files may be placed.

Parameters:
originalName - the original file name
Returns:
the temp directory
Throws:
IOException - for any error

close

public void close()
           throws IOException
Close this provider and delete any temp files associated with it.

Specified by:
close in interface Closeable
Throws:
IOException

finalize

protected void finalize()
Overrides:
finalize in class Object

JBoss VFS 3.0.1.GA

Copyright © 2011 JBoss, A division of Red Hat, Inc. All Rights Reserved.