public class RandomTempFile extends File
RandomInputStream,
Serialized FormpathSeparator, pathSeparatorChar, separator, separatorChar| Constructor and Description |
|---|
RandomTempFile(File root,
String filename,
long sizeInBytes) |
RandomTempFile(int sizeInBytes)
Creates, and fills, a temp file with a randomly generated name and specified size of random ASCII data.
|
RandomTempFile(String filename,
int sizeInBytes)
Creates, and fills, a temp file with the specified name and specified
size of random ASCII data.
|
RandomTempFile(String filename,
long sizeInBytes)
Creates, and fills, a temp file with the specified name and specified
size of random ASCII data.
|
RandomTempFile(String filename,
long sizeInBytes,
boolean binaryData)
Creates, and fills, a temp file with the specified name and specified
size of random binary or character data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createFile(long sizeInBytes) |
boolean |
delete() |
boolean |
equals(Object obj) |
static File |
randomUncreatedFile() |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, deleteOnExit, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLpublic RandomTempFile(int sizeInBytes)
throws IOException
sizeInBytes - The amount of random ASCII data, in bytes, for the new temp
file.IOException - If any problems were encountered creating the new temp file.public RandomTempFile(String filename, int sizeInBytes) throws IOException
filename - The name for the new temporary file, within the Java temp
directory as declared in the JRE's system properties.sizeInBytes - The amount of random ASCII data, in bytes, for the new temp
file.IOException - If any problems were encountered creating the new temp file.public RandomTempFile(String filename, long sizeInBytes) throws IOException
filename - The name for the new temporary file, within the Java temp
directory as declared in the JRE's system properties.sizeInBytes - The amount of random ASCII data, in bytes, for the new temp
file.IOException - If any problems were encountered creating the new temp file.public RandomTempFile(String filename, long sizeInBytes, boolean binaryData) throws IOException
filename - The name for the new temporary file, within the Java temp
directory as declared in the JRE's system properties.sizeInBytes - The amount of random ASCII data, in bytes, for the new temp
file.binaryData - Whether to fill the file with binary or character data.IOException - If any problems were encountered creating the new temp file.public RandomTempFile(File root, String filename, long sizeInBytes) throws IOException
IOExceptionpublic void createFile(long sizeInBytes)
throws IOException
IOExceptionpublic static File randomUncreatedFile()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.