|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.util.TempDirectoryManager
Field Summary | |
private static java.lang.String |
COUNTER_FILE_NAME
|
private static java.lang.String |
TEMP_DIRECTORY_NAME
|
private static java.io.File |
tempDir
|
Constructor Summary | |
private |
TempDirectoryManager()
|
Method Summary | |
static void |
clearAllTempFiles()
Remove all files in temp directory other than namer. |
static void |
deleteTempFile(long id)
|
private static java.io.File |
getFileById(long id)
|
static java.io.File |
getNewTempFile()
|
static java.io.File |
getNewTempFile(long id)
|
static long |
getNextID()
Gets the next unique ID from the Counter object. |
static java.io.File |
getTempFileById(long id)
|
static byte[] |
getTempFileBytesById(long id)
|
static void |
main(java.lang.String[] args)
|
private static void |
makeCounterIfNeeded(java.io.File flCounter)
Creates and stores the Counter object if it does not already exist in the temp directory. |
static long |
makeNewTempFile(byte[] by)
|
private static void |
makeTempDirIfNeeded()
Creates the temp directory if it does not exist. |
static void |
removeTempFiles(java.util.Date olderThanDate)
Remove all files in temp directory (except namer) older than specified Date. |
static long |
streamFromFileToTemp(java.io.File fl)
|
static void |
streamFromTempToFile(long tempFileID,
java.io.File fl)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String TEMP_DIRECTORY_NAME
private static final java.lang.String COUNTER_FILE_NAME
private static java.io.File tempDir
Constructor Detail |
private TempDirectoryManager()
Method Detail |
public static void clearAllTempFiles()
public static void removeTempFiles(java.util.Date olderThanDate)
private static void makeTempDirIfNeeded() throws java.io.IOException
java.io.IOException
public static long getNextID() throws java.io.IOException
java.io.IOException
public static java.io.File getNewTempFile() throws java.io.IOException
java.io.IOException
public static byte[] getTempFileBytesById(long id) throws java.io.IOException
java.io.IOException
public static long makeNewTempFile(byte[] by) throws java.io.IOException
java.io.IOException
public static long streamFromFileToTemp(java.io.File fl) throws java.io.IOException
java.io.IOException
public static void streamFromTempToFile(long tempFileID, java.io.File fl) throws java.io.IOException
java.io.IOException
public static java.io.File getTempFileById(long id) throws java.io.IOException
java.io.IOException
public static java.io.File getNewTempFile(long id) throws java.io.IOException
java.io.IOException
public static void deleteTempFile(long id) throws java.io.IOException
java.io.IOException
private static java.io.File getFileById(long id)
private static void makeCounterIfNeeded(java.io.File flCounter) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |