FileHandler insteadpublic class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(InputStream in,
OutputStream out)
Deprecated.
Copies data from an InputStream to an OutputStream.
|
void |
copy(InputStream in,
OutputStream out,
int bufSize)
Deprecated.
Copies data from an InputStream to an OutputStream.
|
File |
createDirectory(File parentDir,
String name)
Deprecated.
|
File |
createDirectory(URI parentDir,
String name)
Deprecated.
Convenience method for creating a new directory inside another one.
|
File |
createTmpDirectory(String name)
Deprecated.
Creates a temporary directory.
|
File |
createUniqueTmpDirectory()
Deprecated.
Creates a unique temporary directory.
|
void |
delete(File item)
Deprecated.
Deletes a file or directory, removing any children as appropriate.
|
String |
getFilename(String filePath)
Deprecated.
Convenience method that returns a relative filename and its extension from a complete file
path (path, name and extension).
|
public final File createDirectory(URI parentDir, String name) throws IOException
parentDir - The directory in which the new directory should be createdname - The name of the directory to createIOException - If the directory could not be createdpublic final File createDirectory(File parentDir, String name) throws IOException
IOExceptioncreateDirectory(URI, String)public File createTmpDirectory(String name)
name - The name of the directory to createpublic final String getFilename(String filePath)
filePath - the full file path (including relative name and extension)public File createUniqueTmpDirectory()
public void copy(InputStream in, OutputStream out) throws IOException
in - InputStream to copy data fromout - OutputStream to copy data toIOException - if an I/O error occurspublic void copy(InputStream in, OutputStream out, int bufSize) throws IOException
in - InputStream to copy data fromout - OutputStream to copy data tobufSize - size of the copy bufferIOException - if an I/O error occurspublic void delete(File item)
item - in file or directory to removeCopyright © 2004-2013 Codehaus. All Rights Reserved.