public class LimitedTemporaryStorage extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
class |
LimitedTemporaryStorage.LimitedOutputStream |
Constructor and Description |
---|
LimitedTemporaryStorage(File storageDirectory,
long maxBytesUsed) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
LimitedTemporaryStorage.LimitedOutputStream |
createFile()
Create a new temporary file.
|
void |
delete(File file) |
long |
maxSize() |
public LimitedTemporaryStorage(File storageDirectory, long maxBytesUsed)
public LimitedTemporaryStorage.LimitedOutputStream createFile() throws IOException
TemporaryStorageFullException
if the temporary storage area fills up.TemporaryStorageFullException
- if the temporary storage area is fullIOException
- if something goes wrong while creating the filepublic void delete(File file)
public long maxSize()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2011–2017. All rights reserved.