public class TempDirectory extends Object
Constructor and Description |
---|
TempDirectory() |
Modifier and Type | Method and Description |
---|---|
static File |
createTemporaryFile(byte[] inputBytes,
String tmpFilePath) |
static File |
createTemporaryFile(InputStream resourceStream,
String tmpFilePath) |
static File |
getDirectory()
Returns the directory at the root of the temporary file location.
|
static File |
getFile(String path)
Returns a File where you can store a temporary file with a given path.
|
static File |
resourceToTemporaryFile(String resourcePath)
Loads a resource from the classpath into a temporary file and returns that file.
|
public static File getDirectory()
public static File getFile(String path)
path
- the path of the file to return, relative to the temporary directorypublic static File resourceToTemporaryFile(String resourcePath)
RuntimeException
- if an error occurred copying the classpath resource to a temporary locationpublic static File createTemporaryFile(InputStream resourceStream, String tmpFilePath)
Copyright © 2003–2017 Atlassian. All rights reserved.