Package fi.iki.elonen
Class NanoHTTPD.DefaultTempFileManager
- java.lang.Object
-
- fi.iki.elonen.NanoHTTPD.DefaultTempFileManager
-
- All Implemented Interfaces:
NanoHTTPD.TempFileManager
- Enclosing class:
- NanoHTTPD
public static class NanoHTTPD.DefaultTempFileManager extends java.lang.Object implements NanoHTTPD.TempFileManager
Default strategy for creating and cleaning up temporary files.This class stores its files in the standard location (that is, wherever
java.io.tmpdir
points to). Files are added to an internal list, and deleted when no longer needed (that is, whenclear()
is invoked at the end of processing a request).
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<NanoHTTPD.TempFile>
tempFiles
private java.io.File
tmpdir
-
Constructor Summary
Constructors Constructor Description DefaultTempFileManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
NanoHTTPD.TempFile
createTempFile(java.lang.String filename_hint)
-
-
-
Field Detail
-
tmpdir
private final java.io.File tmpdir
-
tempFiles
private final java.util.List<NanoHTTPD.TempFile> tempFiles
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceNanoHTTPD.TempFileManager
-
createTempFile
public NanoHTTPD.TempFile createTempFile(java.lang.String filename_hint) throws java.lang.Exception
- Specified by:
createTempFile
in interfaceNanoHTTPD.TempFileManager
- Throws:
java.lang.Exception
-
-